ordinary differential equation

i have an equation d(theta)/dt=((P*L^2)/(E*I))*sin(theta*D/L)
L=55.863; D=15.484; E=200*10^9; I=138; P=440*10^6
The initial theta at 1198 years is 0.010degrees.
i have to find theta from the year 1198 to 1990
can someone please help me.its urgent

Réponses (1)

Grzegorz Knor
Grzegorz Knor le 29 Sep 2011

0 votes

Use ode45:
L=55.863; D=15.484; E=200*10^9; I=138; P=440*10^6;
ode45(@(t,theta)((P*L^2)/(E*I))*sin(theta*D/L),[1198 1990],0.01)

7 commentaires

12ar.af
12ar.af le 29 Sep 2011
Thank you very much. i have another question.
Can i do the same thing using inline method?if so can you show me how?
and how do u print these theta values?
and if i wanted to find angles for 200 years beyond 1990, how would i do that?
it would be appreciated if u could help.thanks
Grzegorz Knor
Grzegorz Knor le 29 Sep 2011
Just add two output arguments, and colon in tspan:
[T THETA] = ode45(@(t,theta)((P*L^2)/(E*I))*sin(theta*D/L),[1198:1990],0.01)
Grzegorz Knor
Grzegorz Knor le 29 Sep 2011
I don't recomend you inline function, but solution is as follows:
fun = inline('((440*10^6*55.863^2)/(200*10^9*138))*sin(theta*15.484/55.863)','t','theta');
ode45(fun,[1198 1990],0.01)
12ar.af
12ar.af le 29 Sep 2011
Thanks again.can you tell me how to find theta after 200years from 1990?how do you calculate this?
Grzegorz Knor
Grzegorz Knor le 29 Sep 2011
Solve your equation from 1198 to 1990+200:
[T Y] = ode45(@(t,theta)((P*L^2)/(E*I))*sin(theta*D/L),[1198 1990+200],0.01);
disp(sprintf('year: %i, theta: %.3d',T(end),Y(end)))
12ar.af
12ar.af le 29 Sep 2011
Can we make the values into a table or something.like year and theta side by side?
Grzegorz Knor
Grzegorz Knor le 29 Sep 2011
Yes, read one of my comment above.
[T THETA] = ode45(@(t,theta)((P*L^2)/(E*I))*sin(theta*D/L),[1198:1990],0.01);
disp([T THETA])

Connectez-vous pour commenter.

Question posée :

le 29 Sep 2011

Community Treasure Hunt

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

Start Hunting!

Translated by