What I want to do is get the slope and intercept of that lilne. Can somebody suggest how to get it?
Thanks
Madhu
see POLYFIT
x = 1:10 ;
y = 2 * x + 10 + randn(size(x)) ;
plot(x,y,'bo') ;
h = lsline ;
% use the raw data to get the intercept and slope
p = polyfit(x,y,1)
% or using the line drawn by LSLINE
p2 = polyfit(get(h,'xdata'),get(h,'ydata'),1)
Take care when using lsline on plots with multiple line objects ...
hth
Jos