How to fit a set of data where one of the fitting parameters decays exponentially?
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?
Answers (1)
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
Torsten
on 15 Dec 2025
What is x in this case ? It can't be time, the independent variable of the separate fits.
Torsten
on 15 Dec 2025
From the description of the problem, it could be the pump power.
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)
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!
