1

I'm trying to fit a model to the curve you see below:

enter image description here

I need to find a routine for this problem, so it gives optimized value for these parameters (even when the curve is so noisy). I can find some initial guess for the parameters, but I need accurate fit. Here is the script I use to fit the model to data:

FitFunc = @(x,Q) x(1)./(((1+((x(2)*Q).^2)).^((x(3)+1)/2)));
x0 = [400 0.00001 6];

[mfit,resnorm,]  = lsqcurvefit(FitFunc, x0, Q, C)

But then, I get something like this:

enter image description here

I can't figure out what goes wrong, or what are some other methods for fitting a custom model. Could anyone come up with some ideas? At the end of the day, I'm looking to get something like this for my data:

enter image description here

Thanks.

Harald K
  • 26,314
  • 7
  • 65
  • 111
Mona MK
  • 21
  • 2
  • In its current form this question is too broad, first you should answer some basic questions such as how do you measure the goodness of fit, what kind of measure you want to optimize. – rozsasarpi Apr 28 '15 at 19:00
  • Thanks Arpi, I made the question more clear now. – Mona MK Apr 29 '15 at 06:25

0 Answers0