How to fit a set of data where one of the fitting parameters decays exponentially?
40 views (last 30 days)
Show older comments
There are five parameters in the fitting function, we can first fix one of the parameters according to a general knowledge. reviously, we fitted multiple datasets (e.g., time-resolved spectra at different pump powers) independently. Now, we need to perform a global fit where the cavity linewidth (Γ_cav) must decay exponentially across all datasets. Our model is a two-coupled oscillator modeal, where the resonance energy and linewidth of emitters and cavity, and their coupling strength are obtained parameters. Could you advise on the general strategy for setting initial values in this case?Perhaps, could we implement a loop. In each iteration for a new dataset, the intial guess for the cavity linewidth (Γ_cav) would be perdicated on the exponential decay function using the parameters estimated fromthe already fitted datasets?
0 Comments
Answers (1)
Matt J
on 15 Dec 2025 at 14:19
Edited: Matt J
on 15 Dec 2025 at 19:33
Why not just replace Γ_cav in your model equation by a parametrized exponential, e.g.,
Γ_cav=a*exp(b*x)
where a and b are new unknowns.
5 Comments
Sam Chak
on 15 Dec 2025 at 15:08
I believe that @Jiamin may have considered that approach as well. However, I suspect that the multiple data sets likely display varying degrees of exponential decay, as shown below. Therefore, I guess that the OP asked whether a looping approach could be implemented to fit multiple data sets.
dr = 1:0.1:2;
tspan = 0:0.2:20;
y = zeros(numel(tspan), length(dr));
figure
hold on
for i = 1:length(dr)
G = tf(1, [1, 2*dr(i), 1]);
[y(:,i), t] = step(G, tspan);
plot(t, 1 - y(:,i))
end
hold off
xlabel('Time')
ylabel('Amplitude')
grid on
figure
surf(dr, t, 1 - y, 'FaceAlpha', 2/3, 'EdgeColor', 'none')
xlabel('Damping ratio')
ylabel('Time')
zlabel('Amplitude')
view(135, 45)
See Also
Categories
Find more on Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
