MATLAB: power function curve fitting -


i know matlab code form of power polynomial y = xm.
require numerical value of m fitting curve set of data. initial program follows:

load    n = a(:, 1); t = a(:, 2);     p = polyfit(log(n), log(t), 1);     f = (p, t);     plot(t, n, '-', t, f, '-'); 

my doubt above polyfit function used curve fitting equation y = bxm not fitting data set, require b = 1.

third parameter of polyfit degree of polynomial, m in case.

you can pass parameter larger m polyfit. then, if assumption model correct p[m + 1] largest component of p (and close 1), while others should close zero.


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -