MATLAB: I need a program for the problem that i have posted below

doit4mehomeworkno attemptspring mass

i need a code for this problem and a graph as shown below

Best Answer

The m refers to metres! It shouldn't be included in your expression for x. Remove it and you should get your desired plot.
Related Question