Fitting Two Exponentials (find mid-pt and fit to reduce chi-sq)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I wonder if there's a way to fit two (non-overlapping) exponentials to a single curve. Is there a fitting program on MATLAB user exchange that'll test fits for a mid-point, and refit or spit out something like this? Ulitmatley the fits should have a minimum chi-square? An example would be fitting to data looking like (imagine the data require fitting-obviously my script has boring data)
figure;
tmpx = 1:0.05:5;
tmpx2 = 5:0.05:10;
% construct one exp, and another
y1=exp(-1/100*tmpx);
y2=exp(-1/50*tmpx2);
% offset so they match-up (graphically)
y1 = y1 - (y1(end) - y2(1));
% add randomness for the spirit of fitting!
y1 = y1 + rand(size(y1))/100;
y2 = y2 + rand(size(y2))/75;
% Plot modded y1, and orignal y2 (notice they match up)
plot(tmpx,y1,'b.'); hold on;
plot(tmpx2,y2,'r.')
Thanks for any help. Michael
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!