60 likes | 196 Views
MATLAB 2D Plots II. ENGR 1181 Presentation by Annie Abell. The fplot Command. fplot ('function', [limits ]) The fplot command lets you plot a function Only one variable can be referenced in the function Function is entered as a string. The fplot Command.
E N D
MATLAB 2D Plots II ENGR 1181 Presentation by Annie Abell
The fplot Command fplot('function', [limits]) • The fplot command lets you plot a function • Only one variable can be referenced in the function • Function is entered as a string
The fplot Command Plot the function y = x^3 + 2x^2 -5 for -3<x<3: >> x=0 >>fplot('x^3 + 2*x^2 -5', [-3,3])
Polar Plots polar (theta, r) • The polar command plots functions with coordinates r andƟ. • r and Ɵ must be equal length vectors. • Use 'hold on, hold off' to plot multiple curves.
Subplots subplot(rows, columns, plot #) • Use before typing the plot command • Specifies the location of the subsequent plot