How can I do the best fit of a power function with my original data
Show older comments
I have two variables (x,y). we found by eye that y = x^1/2.33, but it is not perfect for what I want and also when I test the correlation it gives me ONE but I think it should not be one because there is a variance value 0.0113. I can use the 'basic fitting' but there is no option of the power function. Thanks in advance
Accepted Answer
More Answers (1)
Torsten
on 20 Jun 2018
xdata = ...;
ydata = ...;
a0 = 1/2.33;
fun = @(a)sum((ydata-xdata.^a).*xdata.^a.*log(xdata));
a = fzero(fun,a0)
Best wishes
Torsten.
1 Comment
Ahmed Abdalazeez
on 21 Jun 2018
Categories
Find more on Parallel and Cloud in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!