Matlab code is available here: http://geekeeceebee.com/FDM%20Matlab....
Consider supporting me on Patreon: https://tinyurl.com/PatreonCB
Model Spring Mass Damper System using Finite Difference Method in Matlab
Differential equation using Matlab Finite Difference Method
Mechanical Vibration system Problem Solution