% plotting a simple 1d graph in Matlab.         Barnett 10/30/07

x = -1:0.01:3;                % choose your domain and resolution (step size)
f = @(x) -5 + 8*x - 2*x.^2;    % your function (remember to use dot-times, etc)
figure; plot(x, f(x), '-');
xlabel('x'); ylabel('f(x)'); title('graph of y = f(x)');
% that's it.