Funzioni MATLAB: la funzione fplot
» help fplot
FPLOT Plot function.
FPLOT(FUN,LIMS) plots the function specified by the string
FUN between the x-axis limits specified by LIMS = [XMIN XMAX].
Using LIMS = [XMIN XMAX YMIN YMAX] also controls the y-axis limits.
FUN must
be the name of an M-file function or a string with variable x that may be passed to EVAL, such as 'sin(x)', 'diric(x,10)'
or '[sin(x),cos(x)]'. ……..
……………
FPLOT(FUN,LIMS,'LineSpec')
plots with the given line specification.
……………..
[X,Y] = FPLOT(FUN,LIMS,...)
returns X and Y such that Y = FUN(X).
No plot is drawn on the screen.
……………
Esempi :
»
» fplot ('[tan(x),sin(x),cos(x)]',2*pi*[-1
1 -1 1])
» fplot (
'log', [0 2*pi] )
Warning:
Log of zero.
> In c:\matlab\toolbox\matlab\specgraph\fplot.m
at line 85
»
» fplot (
'log', [0.1 2*pi] )
» fplot (
'log', [0.1 2*pi], ‘o’)
» [x,y] = fplot('sin',[-0.1
0.1]);
» [x y]
ans =
-0.1000 -0.0998
-0.0996 -0.0994
-0.0988 -0.0986
-0.0972 -0.0970
-0.0940 -0.0939
-0.0876 -0.0875
-0.0748 -0.0747
-0.0492 -0.0492
0.0020 0.0020
0.1000 0.0998
Alba C. Simoncelli | - MATLAB (nov. 2002) - pag.17 | Indice | Pag. Prec. | Pag. Seg. |