4th order Runge Kutta method

Hi,
I'm trying to solve the following eqaution using runge kutta method. I have not seen any examples in this type.-------------------------------------------------------------------------------------------------------------------------------------- here is the question: -----------------------------------------------------------------------------------------------------------------The pendulum(in figure) is suspended from a sliding collar. The system is at rest when the oscillating motion y(t) = A*sin(ωt) is imposed on the collar, starting at t = 0. The differential equation describing the motion of pendulum is ---------------------------------------------------------------------------------------------------------------θ''= - (g/L)*sinθ+(ω^2/L)*A*cosθ*sinωt------------------------------------------------------------------------------------------- Assuming, g = 9.81m/ s2 , L =1.0m, A = 0.25m, andw = 2.5rad /s , solve the above differential equation using numerical methods as indicated below.. -------------------------------------------------------------------------------Plot q versus t from t = 0 to10s and determine the largest q during this period.-------------------------------------- Write MATLAB programs-------------------------------------------------------------------------------------------------------------- (a) pendulum_RK4.m : that implements the classical 4th order Runge-Kutta Method-------------------------------(b) pendulum_ABM3.m : that implements the three-step Adams-Bashforth Method Compare the results obtained with pendulum_RK4.m and pendulum_ABM3.m.

1 件のコメント

Jan
Jan 2017 年 3 月 26 日
Please format your code . What is your question?

サインインしてコメントする。

回答 (1 件)

Aamir Hamid
Aamir Hamid 2017 年 11 月 2 日

0 投票

how to write MATLAB code for finite domain.

1 件のコメント

Jan
Jan 2017 年 11 月 2 日
Please do no hijack a foreign thread by adding a new question in the section for answers. Open a new thread instead and be so kind to explain any details.

サインインしてコメントする。

質問済み:

Xin
2013 年 5 月 7 日

コメント済み:

Jan
2017 年 11 月 2 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by