function [X,Y] = quadplot(e0,e1,e2) % help text goes here... % deal with missing inputs if nargin<3 e2=0; end if nargin<2 e1=0; end if nargin<1 % if no inputs, display usage message – otherwise plot curve disp('usage: [X,Y] = polyplot(e0,e1,e2)') else X = [-100:0.1:100]; Y = e0 + e1*X + e2*X.^2; figure; plot(X,Y,'linewidth',3) end