Fitting of autocorrelation function
21 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
bym
il 6 Gen 2012
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 ?
Risposte (0)
Vedere anche
Categorie
Scopri di più su Get Started with Curve Fitting Toolbox in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!