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 件)

カテゴリ

ヘルプ センター および File Exchange で Mathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by