Hi,
I am trying to simulate a spectrum using the baseline function during the simulation. My question is: how can I obtain the baseline signal given during esfit or plot it to use elsewhere?
I tried the following code, but it dose not give the same line as esfit.
[B, data] = eprload('SIM54KGY.spc'); % Load spectrum data
plot(B, data, 'k-', 'LineWidth', 1.5, 'DisplayName', 'Original Spectrum'); hold on;
% Perform baseline correction
[spc, baseline] = basecorr(data, 1, 3); % 3rd-order baseline correction
% Plot the baseline
plot(B, baseline, 'r--', 'LineWidth', 1.5, 'DisplayName', '3rd Order Baseline');
Here is the figure I got:
this one is what esfit provide:
Thank you in advance.
hasan