Professional Documents
Culture Documents
Engineering
Homework Assignment 3
Dimitrios Fafalis, PhD
dfafalis@ccny.cuny.edu
due Friday, February 15, 2019 – for 5AD
Submit your files and a report with the results on Blackboard by due date.
For a quick reference for homework 1 read sections 1-4 of Appendix B of your textbook.
PROBLEM 1. points 10 – Use MATLAB
The height of a small rocket y can be calculated as a function of time after blastoff with the
following piecewise function:
38.1454t + 0.13743t ,
3
for 0 ⩽ t < 15
y(t) = 1036 + 130.909(t − 15) + 6.18425(t − 15) − 0.428(t − 15) , for 15 ⩽ t < 33
2 3
2900 − 62.468(t − 33) − 16.9274(t − 33)2 + 0.41796(t − 33)3 , for t > 33
Develop a well-structured pseudocode function to compute y as a function of t. Note
that if the user enters a negative value of t or if the rocket has hit the ground (y ⩽ 0) then
return a value of zero for y. Also, the function should be invoked in the calling program as
height(t). Write the algorithm in MATLAB!.
PROBLEM 2. points 10 – Use MATLAB
The following table gives the approximate values of the static coefficient of friction µ for
various materials
Materials µ
Metal on metal 0.20
Wood on wood 0.35
Metal on wood 0.40
Rubber on concrete 0.70
To start a weight W moving on a horizontal surface, you must push with a force F , where
F = µW . Write a MATLAB program that uses the switch structure to compute the force
F . The program should accept as input the value of W and the type of materials.
1
PROBLEM 3. points 10 – Use MATLAB
Plot the function
( )
y = 10 1 − e−x/4
over the interval 0 ≤ x ≤ xmax , using a while loop to determine the value of xmax such that
y(xmax ) = 9.8. Properly label the plot. The variable y represents force in newtons, and the
variable x represents time in seconds.