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

답변 (1개)

Grzegorz Knor
Grzegorz Knor 2011년 9월 29일

0 개 추천

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

12ar.af
12ar.af 2011년 9월 29일
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 2011년 9월 29일
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 2011년 9월 29일
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 2011년 9월 29일
Thanks again.can you tell me how to find theta after 200years from 1990?how do you calculate this?
Grzegorz Knor
Grzegorz Knor 2011년 9월 29일
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 2011년 9월 29일
Can we make the values into a table or something.like year and theta side by side?
Grzegorz Knor
Grzegorz Knor 2011년 9월 29일
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])

댓글을 달려면 로그인하십시오.

카테고리

질문:

2011년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by