This is an old revision of the document!
====== Math 445 lecture 16: 3D graphics ====== <file matlab plot1d.m> % How would you make a graph of f(x) = (x-1)^2 on -3 < x < 3 % Creat vector x of gridpoints with linspace % Evaluate f(x) on gridpoints using dot operators % Use plot(x,f) to draw the graph x = linspace(-3, 3, 100); f = (x-1).^2; plot(x,f) xlabel('x') xlabel('f(x) = (x-1)^2') </file>