Graphics Programs Reference
In-Depth Information
subplot(2, 2, 3), ezplot('xˆ4')
subplot(2, 2, 4), ezplot('xˆ5')
surf Draws a solid surface.
[X,Y] = meshgrid(-2:.1:2, -2:.1:2);
surf(X, Y, sin(pi*X).*cos(pi*Y))
text Annotates a figure, by placing text at specified coordinates.
text(x, y, 'string')
title Assigns a title to the current figure window.
title 'Nice Picture'
xlabel Assigns a label to the horizontal coordinate axis.
xlabel('Year')
ylabel Assigns a label to the vertical coordinate axis.
ylabel('Population')
view Specifies a point from which to view a 3D graph.
ezsurf('(xˆ2 + yˆ2)*exp(-(xˆ2 + yˆ2))'); view([0 0 1])
syms x y; ezmesh(x*y); view([1 0 0])
zoom Rescales a figure by a specified factor; zoom by itself enables use of the mouse
for zooming in or out.
zoom
zoom(4)
MATLAB Programming
any True if any element of an array is nonzero.
if any(imag(x) ˜= 0); error('Inputs must be real.'); end
all True if all the elements of an array are nonzero.
break Breaks out of a for or while loop.
case Used to delimit cases after a switch statement.
computer Outputs the type of computer on which MATLAB is running.
dbclear Clears breakpoints from a file.
dbclear all
dbcont Returns to an M-file after stopping at a breakpoint.
dbquit Terminates an M-file after stopping at a breakpoint.
Search WWH ::




Custom Search