function []=hw1_1_9() x=[-2:0.1:2]; y=exp(-x.^2).*cos(20*x); % hold on makes all successive plots appear on the same axes hold on plot(x,y,'r') fplot('exp(-x^2)*cos(20*x)',[-2,2]) title('plot (red) vs. fplot (blue)') hold off % or instead of using hold you can get a second figure window with the command: % plot(x,y) % figure % fplot('exp(-x^2)*cos(20*x)',[-2,2])