Question: This is a MatLAB question. Problem 3: Simple Harmonic Motion Sinusoids are used to model simple harmonic motion as illustrated in the figure below that
Problem 3: Simple Harmonic Motion Sinusoids are used to model simple harmonic motion as illustrated in the figure below that shows a mass attached to a spring. If we assume no loss of energy, the displacement of the mass looks like a cosine wave. In this problem, we will assume the oscillations are undamped. Assuming simple harmonic motion, the displacement of the mass is given by: ADisplacement of Mass (m) (how much spring is compressed initially) K -Spring Constant (N/m) M Mass of suspended mass and spring (kg) Time (s) The velocity of the mass is the derivative of displacement with respect to time: (m/s) The kinetic energy and the potential energy (both in units of Joules) can be calculated as follows: PE = : (J) Write a script file that does the following: 1. Prompts the user using input statements for initial
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
