Page 34 -
P. 34
In-Class Exercises
Pb. 1.13 Use the contour function to graphically find the locus of points
on the above sinc surface that are 1/2 units above the x-y plane (i.e., the sur-
face intersection with the z = 1/2 plane).
Pb. 1.14 Find the x-y plane intersection with the following two surfaces:
z =+ + y
x
3
1
z =− x − 4 y
42
2
Pb. 1.15 Verify your answers to Pb. 1.14 with that which you would obtain
analytically for the shape of the intersection curves of the surfaces with the
x-y plane. Also, compute the coordinates of the point of intersection of the
two obtained curves. Verify your results graphically.
Pb. 1.16 Plot the surfaces that you have selected in your preparatory activ-
ity. Look in the help folder for the view command to learn how to view these
surfaces from different angles.
1.8 Polar Plots
MATLAB can also display polar plots. In the first example, we draw an
ellipse of the form r = 1 + ε cos(θ) in a polar plot; other shapes are given in the
other examples.
Example 1.16
Plot the ellipse in a polar plot.
Solution: The following sequence of commands plot the polar plot of an
ellipse with ε = 0.2:
th=0:2*pi/100:2*pi;
rho=1+.2*cos(th);
polar(th,rho)
The shape you obtain may be unfamiliar; but to verify that this is indeed an
ellipse, view the curve in a Cartesian graph. For that, you can use the MAT-
LAB polar to Cartesian converter pol2cart, as follows:
© 2001 by CRC Press LLC