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: (yet unsolved) how to Solve coupled ODEs
Replies: 4   Last Post: Feb 13, 2013 4:11 AM

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: (yet unsolved) how to Solve coupled ODEs
Posted: Feb 12, 2013 3:04 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply



"Henry " <mflacius1521@gmail.com> wrote in message
news:kfe1ft$mlu$1@newscl01ah.mathworks.com...
> hi, I tried the following
>
> [T,sols] = ode45(@yprime, [1 20],0.000001*ones(1,40)');
>
> function dyds = odeeqns(s,y)
> global a b c d
> dyds1 = 1./y(1) .*(y(2) .* (d + y(2)./ s) - a .* y(1) .* sqrt(y(1).^2 +
> (b + y(2)).^2));
> dyds2 = - (y(2) .* (b + y(2)) .* sqrt(y(1).^2 + (b + y(2)).^2))./y(1) -
> y(2)./s - c;
> dyds = [dyds1 dyds2];
> size(dyds) % 1 x 40


An array with 1 row and 40 columns is a vector, but it is not a COLUMN
vector.

An array with 40 rows and 1 column is a column vector.

--
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.