Fitting of autocorrelation function
9 次查看(过去 30 天)
显示 更早的评论
Hi,
I am not an expert in curve fitting and stuck with a problem where I want to fit a function to a measured data set in order to extract parameters.
The data set contains values of the autocorrelation of diffusing fluorescent particles (G(tau), measured using a confocal microscope. Tau is the correlation time.
I would like to fit the data set using the following equation:
G(tau) = 1/x(1)*x(2)*((1+tau/x(3))^-1)*(1+tau/x(4)^2*x(3))^(-1/2)
in order to extract the parameters x(1), x(2), X(3) and x(4)
In theory I should be able to fit the data set using the Levenberg-Marquardt non-linear least-squares fit. I was so far experimenting with lsqcurvefit and fminsearch to solve the problem but could not get a reasonable fit. I am not sure whether I have a conceptual problem here or whether it is a problem with my implementation. I therefore would appreciate your help a lot!
I tried so far:
beta0=[];
beta = lsqcurvefit(@fcspddeb,[4.09E3, 0.3, 0.1,3],fcsdatatrimmed(:,1),fcsdatatrimmed(:,2));
where fcspddeb is:
function [ G ] = fcspddeb( x, tau )
G = 1/x(1)*x(2)*((1+tau/x(3)).^-1).*(1+tau/x(4)^2*x(3)).^(-1/2)
end
This gives me a completely wrong fit.
Thanks a lot for your help in advance,
Philipp
2 个评论
bym
2012-1-6
please format your code. for functions returning one variable, the brackets are not necessary, but I don't think that is the problem. Can you post a small subset of fcsdatatrimmed ?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Curve Fitting Toolbox 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!