SUNY Geneseo Department of Mathematics
Friday, September 26
Math 230 01
Fall 2014
Prof. Doug Baldwin
plot
function: save x and y in variablesplot( x, y )
% Plot a simple function:
x = linspace( -3, 3 );
y = 4 - x .^ 2;
figure;
plot( x, y );
% Or...
x = -3:3;
y = 4 - x .^ 2;
plot( x, y );
% Plot a circle:
t = linspace( 0, 2*pi, 200 );
x = cos(t);
y=sin(t);
plot(x,y)
axis equal;