0% found this document useful (0 votes)
22 views1 page

Assignment2 Sec51

asdasdasdaasd

Uploaded by

OMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

Assignment2 Sec51

asdasdasdaasd

Uploaded by

OMAR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

University of Windsor

GENG-2102 Programming and Algorithms


Assignment #2
Sec 51
Week of Sep 15, 2024, due at the end of each lab session

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 10 evenly spaced values between 0 and
10s.
b) Use vector t to calculate the corresponding displacements x(t) if A=4cm and
w=0.6rad/s

2. A 3500 lb motor and plate are in equilibrium and supported by


three cables. The tensions in the cables Fb, Fc, and FD can be
found by solving the following system of linear algebraic
equations.

0.5 FB – FC + 0.333 FD = 0
0.866 FB – 0.667 FD = 0
0.667 FD = 600

Write a MATLAB program in which


a) Define matrix A and vector b so that the system above is in matrix form Ax=b
b) Use A and b to calculate the corresponding tensions Fb, Fc, and FD.

3. Write a MATLAB program in which you


a) Load the array/matrix from the provided DistnceTime.mat file
b) Assign the first column of the imported matrix to a vector t
c) Assign the third column of the imported matrix to a vector D
d) If t is the time instances and D is the corresponding travelled distances, calculate the
velocity for the first time interval (between t(1) and t(2))
∆𝐷
𝑉⬚ =
∆𝑡
Note: Make sure that DistnceTime.mat file is in your MATLAB “Current Folder”

You might also like