Write a MATLAB script to solve the equation of motion of a SDOF system using the Central Difference Method. Use the data from Example 10-1 to verify your script.
Input to the script:
m, k, u(0), i(0), and p(t)
p(t) will be approximated as a piecewise linear function. For discretizing the input excitation, choose a time interval t < Tn.
Output:
(a) Plot of displacement time history
(b) Data: displacement, velocity, and acceleration over time