"Sandip" wrote in message <firstname.lastname@example.org>... > Hi: > Please suggest a way... I have a command as below to solve the ode by ode45 and I need to pass three variables. > [x,y]=ode45(@fnode,xspan,y0,c1,c2,c3); > > I have defined the function in .m file as > function yprime = fnode(x,y,c1,c2,c3) > > However, I can not read in the c3 in the function (ode) file. c1 & c2 are coming alright. > > Please help.
But I already gave you the solution ... Call ode45 as [x,y]=ode45(@(x,y)fnode(x,y,c1,c2,c3),xspan,y0) and define the function in an .m file as function yprime = fnode(x,y,c1,c2,c3)