Question: Write a Matlab script (vibrations.m) to do the following task: The natural period of the system is = 2 (5) Plot the displacement x(t) from

Write a Matlab script (vibrations.m) to do the following task: The natural period of the system is = 2 (5) Plot the displacement x(t) from t=0 to t=3T for both the undamped and damped system in two subplots. Remember to add appropriate annotating in your figure. A sample plot is shown below. Try to think how you would solve this problem yourself first. You can also follow the tips below to expand your code in multiple steps. (You should still add your own meaningful comments to the code). A. To begin with, open a new script in Matlab Editor and save it as vibrations.m At the beginning of the script, in a commenting area, put your name and briefly describe the code. B. Create variables for the constants: m, k, A, c and assign the values given. (You dont have to worry about the units here, just use the numbers). Then create variables for , d, T and calculate their values using equations (2), (4), (5) C. Calculate the damped and undamped vibrations. Make a time vector that is linearly spaced between 0 and 3T. Use equation (1) to calculate the undamped vibration. Use equation (3) to calculate the damped vibration. D. Plot the damped and undamped vibration as a function of time in two subplots (Ref: L5 slides 19~20). Remember to add labels, title and/or legends

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!