Upload
yana22
View
220
Download
0
Embed Size (px)
Citation preview
7/28/2019 Assignment 1 v2
1/2
ECOR 2606 Winter 2013 Assignment 1
Question 1: A movie is projected onto a screen with the screen image 4m tall and the bottom
of the image 3m from the ground. You are viewing the image X m from the wall and 1m from
the ground as shown in the figure below.
Remember that in Matlab the functions sin, asin, cos, acos, tan, atan all use angles measured in
radians while the functions sind, asind, cosd, acosd, tand, atand all use angles measured in
degrees.
Produce a script file (to be called Q1.m) that
1. Creates a graph (figure 1) showing the viewing angle in degrees forXfrom 0.01m to10m. The axes of the graph should be appropriately labelled (be sure to include units!),
there should be a title, and a grid should be used. Use functionfplot(NOTplot).
2. Usesfzero to determine the value(s) ofXwith a viewing angle of 25 degrees and outputsthe result in a nicely formatted message (usefprintf). If there is more than 1 solution,
provide all solutions. In preparation for part 3, ensure that the function you pass to
fzero is vector friendly.3. Creates a graph (figure 2) of the vector compatible root finding function that you used in
part (2) forXfrom 0.5 to 15m using theplotfunction (NOTfplot). The axes of the graph
should be appropriately labeled (be sure to include units!), there should be a title, and a
grid should be used.
Submit Q1.m
4m
3m
X m
1m
7/28/2019 Assignment 1 v2
2/2