댓글 수: 2

Rik
Rik 2020년 3월 23일
Can you copy the code instead of an image?
Chandhrikka Ravi
Chandhrikka Ravi 2020년 3월 23일
syms x(t) m g l e a
>> Dx = diff(x);
>> simplify(dsolve(m*diff(x,2) == -m*g*(x-l)/e, t(0) == 0, x(0) == a, Dx(0) == 0))

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

 채택된 답변

Birdman
Birdman 2020년 3월 23일

0 개 추천

Following code solves the problem. The command t(0)==0 does not make any sense since t is independent variable. Also, you used dsolve command incorrectly. See the following code:
syms x(t) m g l e a
Dx=diff(x,t);
x(t)=dsolve(m*diff(x,2) == -m*g*(x-l)/e,[x(0) == a, Dx(0) == 0])
Then, you can verify the solution according to the initial conditions. It is verified.

추가 답변 (0개)

카테고리

질문:

2020년 3월 23일

댓글:

2020년 3월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by