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: solving coupled harmonic oscillators using ode45
Replies: 2   Last Post: Jan 30, 2013 8:51 AM

Advanced Search

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

Posts: 332
Registered: 2/14/08
Re: solving coupled harmonic oscillators using ode45
Posted: Jan 30, 2013 7:51 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

There is error in line:
dy(5) =(-D2*(y(2)-y(1)+D3*(y(3)-y(2))))/m;
must be:
dy(5) =(-D2*(y(2)-y(1))+D3*(y(3)-y(2)))/m;

(wrong place of bracket)

------------------------------------
Maxim Vedenev, Matlab freelancer
vedenev@ngs.ru
http://simulations.narod.ru/



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.