I'm trying to fit a model to the curve you see below:
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:
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:
Thanks.