Can you guys help me?

?̈(?) = -(0.1/50) ?̇(?)-2?(?)

How to numerically integrate to find a solution for ??

Speed of the mass in time-step ? + Δ? is:

?̇(? + Δ?) ≈ ?̇(?) + ?̈(?) ∗ Δ?

and the position in time-step ? + Δ? is:

?(? + Δ?) ≈ ?(?) + ?̇(?) ∗ Δ?

I want to put the previous two equations in a loop and loop from ? = 0 s to ? = 10 s(step Δ? = 0.001 s). And then plot those two graphs into in graph.

Assuming the mass is let go from initial displacement ?(0) = 0.5 m.

But I can’t get it to work in matlab.

## Best Answer