Solve equation system with ode45
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, I was wondering if you could help me.
I'm trying to solve the following equation system using ode45.
I'd need to create the function and plot it using ode45 in the interval [0,300]
This is the function:

This are the initial conditions
g=9.83;
L=67;
Omega= 2*pi/86400
phi = 49/180*pi
x = L /100;
y =0;
x' =0;
y' =0;
I don't know how to apply ode45 for this equation.
I'd gladly accept any help.
Thank you very much.
0 件のコメント
回答 (1 件)
Sam Chak
2022 年 5 月 27 日
編集済み: Sam Chak
2022 年 5 月 27 日
Hi Laura
First thing first, there are 4 state variables which can be defined (on a piece of paper) by
x(t) = z(1)
x'(t) = z(2)
y(t) = z(3)
y'(t) = z(4)
And then type out the 4 first-order differential equations in terms of z(1), z(2), z(3), z(4) on the RHS in MATLAB:
dzdt(1) = z(2); % this is x'
dzdt(2) = ... ; % this is x"
dzdt(3) = z(4); % this is y'
dzdt(4) = ... ; % this is y"
If you have known about the existence of ode45 solver, can you follow the examples to type out the basic code for us to run it so that you learn along the way as we troubleshoot your code?
86400 seconds is 1 day. The object in length l is making a revolution in a day on Earth (because there is g). And ϕ = 49° implies that the object is revolving at a fixed relative orientation.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Ordinary Differential Equations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!