Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Can not pass variable to ode45
Replies: 1   Last Post: Jun 20, 2013 2:29 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Sandip

Posts: 9
Registered: 2/24/10
Can not pass variable to ode45
Posted: Jun 19, 2013 5:12 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.