Hello there,(adsbygoogle = window.adsbygoogle || []).push({});

lets say i have a harmonic oscillator equation d^2x/dt^2 = -w^2 x = -Asin(wt)

w=frequency, A=amplitude..how can i plot this equation for w^2=1, x(0)=1?

and what if the equation contains random number d^2x/dt^2 = -w^2x+Bn, n=gaussian random number with mean value equal to zero. Under the same condition, how do i plot this for 1 trajectory solution (1 time only) and step=0.1?

I m very new to mathlab and i really need to learn these basics to solve the real problem in my project...any help will be very much appreciated..thanks.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Harmonic Oscillator with random number-mathlab

Can you offer guidance or do you also need help?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**