GENG 2102 Syllabus 24
GENG 2102 Syllabus 24
Start MATLAB and use a Script (.m) to solve the following problems.
Instructions:
Open New Script under Home/New Script.
Enter your code and run it.
Save and submit your work in .m file.
Questions:
1. The displacement of a spring-mass system shown in the figure is
described by
𝑥 = 𝐴𝑐𝑜𝑠(𝑤𝑡)
where x is the displacement, A is the amplitude, w is the angular
frequency, and t is time. Write a MATLAB program in which
a) Define a vector t with 12 evenly spaced values between 0 and
12s.
b) Use vector t to calculate the corresponding displacements x(t) if A=4cm and
w=0.6rad/s