Matlab The differential equation for a damped harmonic oscil
Matlab
The differential equation for a damped harmonic oscillator can be written as x + 2 zeta omega_n x + omega^2_n x = 0 Where the natural frequency for mass m and stiffness k can be calculated as: omega_n = squareroot k/m and the damping ratio for damping constant c can be calculated as: zeta = c/2m omega_n MATLAB provide tools for simulating such differential equations. One of which is the function ODE45(), and it is requires that you pass it the name of a function that it can call to calculate the acceleration. There is a critical value of damping that will cause a damped harmonic oscillator to return to it equilibrium position in the shortest time. This critical damping value can be calculated as: c_c = 2m squareroot k/m = 2 squareroot km Use m = 10 kg, k = 30 N/m, x_0 = 1m, v_0 = 0 m/s Write two MATLAB functions Called ME_101_Hwk_5 that: calculate the critical value of damping c_c. calls ODE45 to simulate the motion of the oscillator with critical damping calls ODE45 to simulate the motion of the oscillator with half critical damping value calls ODE45 to simulate the motion of the oscillator with twice critical damping value plots the result in two separate subplots, arranged in a 2 Times 1 grid. Each plot should have correct axis labels, with proper units, a legend indicating which line style corresponds to which damping value, and a title that indicates some or all of the order parameters responsible for the particular curves plotted. The first plot contains the position vs time for all three damping values the second lot contains the velocity vs time for all three damping values Called ode_fun that: accepts the current time and a column vector of the velocity and position calculates the acceleration of the mass at the current instance returns the acceleration and velocity in a column vectorSolution
The diameter of rod produced in a lathe (X) during mass production of nominal dia 20 mm, is known to follow the following distribution: fX(x) = o when x<20 mm = 15 exp(-15*(x-20)) when x>=20 mm Determine the following: 2.1 probability distribution function of diameter of rod (5 points) (1 Point) 2.2 if rods with diameter larger than 20.2 mm are not acceptable, determine the proportion of rods that are accepted and rejected (10 points) (1 Points) 2.3 Find mean and standard deviation of X (5 points) (2 Points)

