You must use the display command dened in the plots

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Inequalities • Plots with logarithmic scales • Density functions • Contours as in a topographical map • Conformal plots of complex functions • Vector fields • Curves in three-dimensional space • Objects of type Matrix • Root loci • Vectors in two and three-dimensional space • Plots in the visualization component of the Student package For further explanation of a particular plot command, refer to ?plots,command . > with(plots): Plot implicitly defined functions by using implicitplot. > implicitplot( x^2+y^2=1, x=-1..1, y=-1..1, scaling= > constrained ); 1 y 0.5 –1 –0.5 0 0.5 x 1 –0.5 –1 5.6 Special Types of Plots • 139 The following is a plot of the region satisfying the inequalities x + y < 5, 0 < x, and x ≤ 4. > inequal( {x+y<5, 0<x, x<=4}, x=-1..5, y=-10..10, > optionsexcluded=(color=yellow) ); 10 5 –1 –5 –10 1 2 3 4 5 Here the vertical axis has a logarithmic scale. > logplot( 10^x, x=0..10 ); 1e+10 1e+09 1e+08 1e+07 1e+06 1e+05 .1e5 .1e4 .1e3 .1e2 1. 2 4 x 6 8 10 A semilogplot has a logarithmic horizontal axis. > semilogplot( 2^(sin(x)), x=1..10 ); 2 1.8 1.6 1.4 1.2 1 0.8 0.6 1. 2. x 4. 7. .1e2 140 • Chapter 5: Plotting Maple can also create plots where both axes have logarithmic scales. > loglogplot( x^17, x=1..7 ); 1e+14 1e+13 1e+12 1e+11 1e+10 1e+09 1e+08 1e+07 1e+06 1e+05 .1e5 .1e4 .1e3 .1e2 1. 2. x 4. 7. In a densityplot, lighter shading indicates a larger function value. > densityplot( sin(x*y), x=-1..1, y=-1..1 ); 1 y 0.5 –1 –0.5 –0.5 –1 0.5 x 1 Along the following curves, sin(xy ) is constant, as in a topographical map. > contourplot(sin(x*y),x=-10..10,y=-10..10); 10 y 5 –10 –5 0 –5 –10 5 x 10 5.6 Special Types of Plots • 141 A rectangular grid in the complex plane becomes the following graph when you map it by z → z 2 . > conformal( z^2, z=0..2+2*I ); 8 6 4 2 –4 –2 0 2 4 The fieldplot command draws the given vector for many values of x and y. That is, it plots a vector field, such as a magnetic field. > fieldplot( [y*cos(x*y), x*cos(x*y)], x=-1..1, y=-1..1); 1 y 0.5 –1 –0.5 –0.5 –1 0.5 x 1 Maple can draw curves in three-dimensional space. > spacecurve( [cos(t),sin(t),t], t=0..12 ); 142 • Chapter 5: Plotting Here Maple inflates the previous spacecurve to form a tube. > tubeplot( [cos(t),sin(t),t], t=0..4*Pi, radius=0.5 ); The matrixplot command plots the values of a object of type Matrix. > A := LinearAlgebra[HilbertMatrix](8): > B := LinearAlgebra[ToeplitzMatrix]([1,2,3,4,-4,-3,-2,-1], > symmetric): > matrixplot( A+B, heights=histogram, axes=frame, > gap=0.25, style=patch); 4 2 0 –2 –4 2 4 column 6 8 8 6 4 row 2 The following is a demonstration of a root locus plot. > rootlocus( (s^5-1)/(s^2+1), s, -5..5, style=point, > adaptive=false ); 5.6 Special Types of Plots • 143 1 0.5 0 –0.5 –1 –1.5 –1 –0.5 0 0.5 1 1.5 The arrow command plots arrows or vectors in two or three dimensions. > plots...
View Full Document

Ask a homework question - tutors are online