Solve a mass-spring damper system My Solutions This exampleshows the recommended way to assess the output of a variable-stepsolver such as ode45 for first-order odes. Supplying a time vectorinstead of a time span to the solver ensures the returned referenceand student solutions are evaluated at the same time points withoutforcing a specifc approach. The mass-spring-damper system iscommonly used in dynamics to represent a wide variety of mechanicalsystems in which energy can be both stored and dissipated. Considerthe suspension system for a tire on a car — modeled as an idealmass-spring-damper system — that encounters a bump in the road,causing a displacement in x. As the system recovers, the positionwill oscillate about 0 until the energy is dissipated (shown in thegraph below). The system response is described by the followingequation: Using the following parameters: mass spring constantdamping coefficient and initial conditions: initial displacementinitical velocity t is a vector of discrete time points between 0and 50 seconds. create a script that: solves for the position x (inm) and velocity (in m/s) of the system at all time points in thevariable tVec. Assign the values to a matrix named msdX. Positionshould be in the first column and velocity in the second. Werecommend using ode45Opens in new tab.

Script

tVec = 0:0.1:50; % Discrete time interval, s

% Model parameters (can be moved to where needed in yourscript)

m = 1100; % kg

k = 570; % N/m

c = 430; % N-s/m

% Write your solution below

## Expert Answer

Answer to Solve a mass-spring damper system My Solutions This example shows the recommended way to assess the output of a variable…