function x=ssec1(xs,fx,c)
% function x=ssec1(xs,fx,c)  finds linear approximation of f(x)=0
% xs gives two values of x to evaluate f(x) at.
% fx is a character vector that tells how to find f(x).
% c is a vector of parameters in f(x)
% The value returned is a linear approximation to: f(x) = 0.
% Thus if f(x) were linear you would find that f(x) is 0.
% The function f(x) must work for both scalar and vector arguments.
% Example: >> cs=[1 -2 -4.25 7.5];
%          >> ssec1([2 3],'polyval(c,x)',cs)
x=xs(1);
fs1=eval(fx);
x=xs(2);
fs2=eval(fx);
fp=(fs2-fs1)/(xs(2)-xs(1));
x=xs(2)-fs2/fp;
