- #1

- 34

- 0

Hello, guys

I am struggling with solving the following ODE related to radial diffusion equation:

du/dt=D*(d^2/dr^2+2/r*du/dr)

For easiness I have attached the main m.file with general commands in Radial_diffusion.m

pde1d.m contains function to be solved by ODE, and dss004.m contains routines for differential solving.

I am getting the following commands:

Undefined function or variable 'r0'.

Error in pde1rd (line 10)

ur=dss004(0.0,r0,nr,u);

Error in odearguments (line 88)

f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.

Error in ode15s (line 149)

[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...

Error in Radial_diffusion (line 30)

[t,u]=ode15s(@pde1rd,tout,u0,options);

Can you please indicate where I did wrong?

I am struggling with solving the following ODE related to radial diffusion equation:

du/dt=D*(d^2/dr^2+2/r*du/dr)

For easiness I have attached the main m.file with general commands in Radial_diffusion.m

pde1d.m contains function to be solved by ODE, and dss004.m contains routines for differential solving.

I am getting the following commands:

Undefined function or variable 'r0'.

Error in pde1rd (line 10)

ur=dss004(0.0,r0,nr,u);

Error in odearguments (line 88)

f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.

Error in ode15s (line 149)

[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...

Error in Radial_diffusion (line 30)

[t,u]=ode15s(@pde1rd,tout,u0,options);

Can you please indicate where I did wrong?