Error When Using ODE45 to solve symbolic ODE Equation : Too many input arguments.
Show older comments
Hi All,
I'm trying to solve the equation below. But when I tried to solve the equtioon I keep reciveing the error "Too Many Input Arguments". I'm not sure what I'm doing wrong.
syms p(t)
s = 1;
N_s = 3e15;
V = 16.7;
S = 4.6;
tao_p = 3.6;
tao_0 = 10e-13;
v=4.82e20;
R=8.31;
T=295;
Ed = 25;
a = ((s*v*tao_0)/(N_s))*exp((Ed)/(R*T));
ode = diff(p)*(1/p) == -((1)/((tao_p)+((tao_p*N_s*a)/(V*((1+a*p)^2)))));
cond = p(0) == 3;
pSol(t) = dsolve(ode,cond)
pp = odeToVectorField(ode);
odsefcn = matlabFunction(pp)
interval = [0 2000];
yInit = [3];
ySol = ode45(odsefcn,interval,yInit);
tValues = linspace(0,20,100);
yValues = deval(ySol,tValues,1);
plot(tValues,yValues)
Thanks in advance...
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!