function h = straightline(fun, varargin);
% STRAIGHTLINE  Creates a line from a function evaluated at just 2 points.

% fun must return a vector y = f(x) for vector valued x

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.1 $  $Date: 2000/05/22 01:34:11 $

if nargin < 1
    error('straightline requires at least one argument');
end

h = graph2d.functionline(fun, varargin{:});
h.Granularity = 2;