Graphics Reference
In-Depth Information
Chapter 5
Graphics Special Commands
5.1 Two Dimensional Graphics: FPLOT and EZPLOT
Commands fplot and ezplot graph curves using commands developed for a wide array of cases without having to
specify all the details built in every time. Their syntax is as follows:
fplot('f , [xmin, x max])
Graphs the function between the limits in each case given in this table.
fplot('f ,[xmin, x max,
ymin, ymax], S)
Graphs the function at intervals of variation of x and y, with options for color and
characters given by S. ymin and ymax control the values of the vertical axis.
fplot('[f1,f2,...,fn],[xmin,
x max, ymin, ymax], S,t,n)
Graphs functions f1, f2,..., fn on the same axes in the ranges of variation of x and
specified with the options for color and characters defined in S
fplot('f ,[xmin, x max],...,t)
Graphs of f using the tolerance t
fplot('f ,[xmin, x max],...,n)
Graphs of f where n> = 1
ezplot('f , [xmin, x max])
Similar to fplot
ezplot('f , [xmin, x max,
ymin, ymax])
Graphs the function f(x,y) at given intervals of variation of x and y . Unlike fplot,
ezplot can be f(x,y)
ezplot(x, y)
Graphs the planar parametric curve x = x(t) and y = y(t) on the domain 0 < t < 2p
ezplot('f , [xmin, x max])
Graphs the planar parametric curve x = x(t) and y = y(t). This is a variation on
ezplot(x,y) which expects two function parameters; the only difference here
is that tmin and tmax are used instead of the implied 0 to 2pi. So, the syntax is
ezplot(fx,fy,[tmin tmax])
ezplot('f ')
Graphs curve f in implicit in [-2p, 2p]
As a first example, perform the graph of the function fx Sinxe
() () ,
=
-04 over the range [0,10]. Figure 5-1 presents
x
the results of the following syntax:
>> x = 0:0.05:10;
>> y = sin(x) .* exp(-0.4*x);
>> plot(x,y)
 
Search WWH ::




Custom Search