How can I resolve this?

3 vues (au cours des 30 derniers jours)
Chandhrikka Ravi
Chandhrikka Ravi le 23 Mar 2020
  2 commentaires
Rik
Rik le 23 Mar 2020
Can you copy the code instead of an image?
Chandhrikka Ravi
Chandhrikka Ravi le 23 Mar 2020
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))

Connectez-vous pour commenter.

Réponse acceptée

Birdman
Birdman le 23 Mar 2020
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.
  1 commentaire
Chandhrikka Ravi
Chandhrikka Ravi le 23 Mar 2020
Thank you!!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by