06 June 2015 0 7K Report

I have a set of data and I plotted (scatter plot) those on log-log scale. Then I fitted a trendline to the data. NOw I need to determine the slope and y intercept of the fitted trendline. How to detrmine that?

 Matlab script used:

p=[......];

q=[.....];

scatter(p,q);

set(gca,'XScale','log');

set(gca,'YScale','log');

b = polyfit(log(p), log(q), 1);

qfit = exp(b(2)) .* p.^b(1);

hold on

plot(p, qfit)

hold off

More Sajith S's questions See All
Similar questions and discussions