function zdot = damped_spring_mass(t,z,d,C,K) % Model for the damped spring-mass-dashpot system % z is a vector of differential equations for the damped % spring-mass-dashpot system % t represents the vector of time values % z represents the solutions at time t % C = c/m, where c is the damping coefficient and m is mass % K = k/m, where k is the spring constant and m is mass % Note d is just a place holder zdot = [z(2); -C*z(2) - K*z(1)];