12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

fplotPurpose2fplotPlot a function between specified limitsSyntaxDescriptionfplot('function',limits)fplot('function',limits,LineSpec)fplot('function',limits,tol)fplot('function',limits,tol,LineSpec)[x,Y] = fplot(...)fplot plots a function between specified limits. The function must be of theform y = f(x), where x is a vector whose range specifies the limits, and y is avector the same size as x and contains the function’s value at the points in x(see the first example). If the function returns more than one value for a givenx, then y is a matrix whose columns contain each component of f(x) (see thesecond example).fplot('function',limits) plots 'function' between the limits specified bylimits. limits is a vector specifying the x-axis limits ([xmin xmax]), or the x-and y-axis limits, ([xmin xmax ymin ymax]).fplot('function',limits,LineSpec) plots 'function' using the linespecification LineSpec. 'function' is a name of a <strong>MATLAB</strong> M-file or a stringcontaining the variable x.fplot('function',limits,tol) plots 'function' using the relative errortolerance tol (default is 2e–3). The maximum number of x steps is (1/tol)+1.fplot('function',limits,tol,LineSpec) plots 'function' using therelative error tolerance tol and a line specification that determines line type,marker symbol, and color.[x,Y] = fplot(...) returns the abscissas and ordinates for 'function' in xand Y. No plot is drawn on the screen. You plot the function using plot(x,Y).Remarksfplot uses adaptive step control to produce a representative graph,concentrating its evaluation in regions where the function’s rate of change isthe greatest.2-200

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!