MuPAD
Pro Computing Essentials - Examples
Example 8.1 - Plotting contours
In this example we will plot both types of contours for the function z=sin
xy.
Contour with option Style=Bottom
export(plot, contour):
justHill := contour(
[x, y, 10*x*y*exp(-x^2-y^2)], x=-2..2, y=-2..2,
Style = Bottom,
LineWidth = 5,
Contours = 20,
Grid = [20,20],
Colors = [Height, RGB::Blue, RGB::Red]
):
plot(justHill)
Contour with option Style=Attached
justHill2 := contour(
[x, y, 10*x*y*exp(-x^2 - y^2)], x=-2..2, y=-2..2,
Style = Attached,
LineWidth = 5,
Contours = 20,
Colors = [Height, RGB::Blue, RGB::Red]
):
plot(justHill2, Scaling = UnConstrained)
|