This is what I am doing with my imported data. What can I do to reduce the multiplicative errors? I tried to adapt non-linear regression to my script but I don't understand the examples that I've found so far. If possible, please suggest what could I do in both scenarios.
- Reduce the error in linear regression
- Apply non-linear regression instead with every line explained
The plot of my data in log scale is shown below.
Thanks
% x: assume any column vector x
% y: assume any column vector y
loglog(x,y, '*');% % Estimating the best-fit line
const = polyfit(log(x),log(y), 1);m = const(1);k = const(2);bfit = x.^m.*exp(k); % y = x^m * exp(k)
hold onloglog(x,bfit)
Best Answer