Fitting ad hoc function to data using MatLab
Show older comments
Dear all,
I have the following data:
x=[0 0 0 11 14 14 19 19 26 37 47 47 53 53 63 74 81 81 86 86 89 100 100 100];
y=[33 33 27 32 32 26 43 38 42 42 45 40 51 43 73 61 52 67 69 79 89 60 86 75];
I have plotted these data using
plot (x, y,'o')
Now I would like to fit the function of the form:
f=(p^(gamma))/(p^gamma+(1-p))^(1/gamma)
to the data. p(i) is equal to x(i). gamma is a variable.
Basically,
(1) I need to find gamma which produces the best fit of the function f (specified above) to the data;
(2) I need to plot f against the data (on the same graph).
I am sure this can be done but for some reason cannot come up with a good algorithm. Could you please suggest some solutions?
Thank you,
Ganna
Accepted Answer
More Answers (0)
Categories
Find more on Interpolation 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!