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: ode45 error (not enough inputs)
Replies: 2   Last Post: Apr 24, 2013 9:06 PM

Advanced Search

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

Posts: 17,944
Registered: 12/7/04
Re: ode45 error (not enough inputs)
Posted: Apr 24, 2013 9:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"iam49erfreak " <iam49erfreak@yahoo.com> wrote in message
news:kl9ie2$i0$1@newscl01ah.mathworks.com...
> I am trying to solve a system of ODEs and when I follow an example on how
> to use ode45 I keep getting an error saying that I don't have enough input
> arguments and that 't' isnt being used. What am I doing wrong? Any help is
> greatly appreciated!
>
> function dy = rigid(t,y)
> dy = zeros(3,1);
> dy(1) = (16.38124)*(y(2) - ((y(1))*(y(2))) + y(1) - (.008376*((y(1))^2)));
> dy(2) = (.0027436)*(y(3) - y(2) - (x*(y(2))));
> dy(3) = (.034132)*(y(1) - y(3));
>
> options = odeset('RelTol',1e-4,'AbsTol',[1e-4 1e-4 1e-5]);
> [T,Y] = ode45(@rigid,[0 610],[4 1.1 4],options);


Move the ODE45 call with @rigid as its first input OUT of the rigid function
itself. It should be in a separate function or script.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com




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.