Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
ode45 mass spring damper solution

Subject: ode45 mass spring damper solution

From: Mark Rossi

Date: 9 Apr, 2013 00:15:12

Message: 1 of 3

Having a lot of trouble understanding how matlab solves second-order ODE's. I have a relatively simple mass spring damper problem, but for the life of me I can't wrap my head around what .m files to write. Any help would be appreciated.

Subject: ode45 mass spring damper solution

From: Nasser M. Abbasi

Date: 9 Apr, 2013 03:19:05

Message: 2 of 3

On 4/8/2013 7:15 PM, Mark Rossi wrote:
> Having a lot of trouble understanding how matlab solves second-order ODE's.
>I have a relatively simple mass spring damper problem, but for the life of
>me I can't wrap my head around what .m files to write. Any help would be appreciated.
>

need to write the 2nd ode as 2, first order ode's. Then use ode45.
many examples on the net.

see

http://12000.org/my_notes/matlab_ODE/index.htm
http://12000.org/my_notes/vanderpol/using_ODE45_to_solve_vanderpol/index.htm

--Nasser
  

Subject: ode45 mass spring damper solution

From: Loren Shure

Date: 9 Apr, 2013 08:32:40

Message: 3 of 3


"Mark Rossi" <mr3bn@virginia.edu> wrote in message
news:kjvmig$9m6$1@newscl01ah.mathworks.com...
> Having a lot of trouble understanding how matlab solves second-order
> ODE's. I have a relatively simple mass spring damper problem, but for the
> life of me I can't wrap my head around what .m files to write. Any help
> would be appreciated.
>

Here's the mass-spring system worked out in detail. You should be able to
go from there.

http://blogs.mathworks.com/loren/2010/03/25/solving-ordinary-differential-equations/

--
--Loren

http://blogs.mathworks.com/loren

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us