Funzioni MATLAB:  la funzione plot, la funzione surf

» help plot

 PLOT   Linear plot.

    PLOT(X,Y) plots vector X versus vector Y.

    PLOT(Y) plots the columns of Y versus their index.  Various line types, plot symbols and colors may be obtained with

    PLOT(X,Y,S) where S is a character string made…………..

    …………

» help surf

 SURF   3-D colored surface.

    SURF(X,Y,Z,C) plots the colored parametric surface defined by four matrix arguments.  The axis labels are determined by the range of X, Y and Z,  or by the current setting of AXIS.  The color scaling is determined   by the range of C , ……

SURF(Z) and SURF(Z,C) use x = 1:n and y = 1:m…………..

Esempio :

»

» x = linspace(0., 3.5, 7)

x =        0    0.5833    1.1667    1.7500    2.3333    2.9167    3.5000

» y = x .^2 -x

y =        0   -0.2431    0.1944    1.3125    3.1111    5.5903    8.7500

» z = sin(x)

z =         0    0.5508    0.9194    0.9840    0.7231    0.2230   -0.3508

» plot(x,y)

» hold

Current plot held

» plot(x,z)

» print   grafico.ps   -f1

» help print

 PRINT  Print graph system; or save graph to M-file.

 PRINT <filename> saves the current Figure window as PostScript  or a printer specific format, as specified by PRINTOPT or a command line option. If a filename is specified, the output is written to the designated file, ……

 PRINT <filename>    -f<figure handle> prints the specified Figure………

 ……………..


Alba C. Simoncelli - MATLAB (nov. 2002) - pag.16                              Indice    Pag. Prec.    Pag. Seg.