From: Adam Parry on
I've just created a straight line with polyval on some data, and I was wondering whether it was possible to find the x value when the polyval becomes zero?

this is what I have got

A = [a1,a2];
B = [b1,b2];

p = polyfit(A,B,1);
f = polyval(p,x);
hold on;
plot(x,f,'r');

I want x @ f = 0

I think