hi my friends
i have a problem in solving ode eq. with matlab
my problem is:
>> [t,y]=ode45('odeex1',[1:0.5:3.5],1)
??? Error using ==> feval
Undefined function or method 'odeex1' for input arguments of type 'double'.
Error in ==> odearguments at 110
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
>> [t,y]=ode45('odeex1',[1:0.5:3.5],1)
??? Error using ==> nargin
Warning: File: odeex1.m Line: 2 Column: 1
The variable "odeex1" is also the name of this script.
This is illegal, because it will be the name of a script and a variable
in any context from which the script is called.
Error: The previous warning is being treated as an error.
Error in ==> odearguments at 81
if (nargin(ode) == 2)
Error in ==> ode45 at 173
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
when i make function in m-file with function structure it errors and even i cant get the function value in specified t and y.my function is:
syms t y
function dydt=odeex1(t,y)
dydt=t*y^(1/3)
amazingly when i checked it with different functions , even the value of the functions couldnot be calculated by matlab software!
and when i make function with inline structure in m-file ,program can calculate the function value but when i use ode 45 as shown in top ,it errors as shown in top.my structure with inline is:
syms t y dydt
odeex1=inline('t.*y.^(1/3)')
i dont know what should i do?