[curve fitting] dependence between coefficients
Show older comments
Dear all -
I need to fit my experimental data (x_data, y_data) with a biexponential decay model:
% define fit options
fo_ = fitoptions('method','NonlinearLeastSquares','Lower',lower,'Upper',upper);
% define fittype
ft_ = fittype('offset+a*exp(-(x-x0)/b)+c*exp(-(x-x0)/d)',...
'dependent',{'y'},'independent',{'x'},...
'coefficients',{ 'offset', 'x0', 'a', 'b', 'c', 'd'});
% perform fit
[cf_, gof, output] = fit(x_data,y_data,ft_,fo_);
offset = y-offset
x0 = x-offset
a and c = amplitudes (weighing factors)
b and d = decay constants
As my experimental data are normalised, i.e. the decay occurs from 1 to 0, I would like to implement the following condition in my fitting routine: a + c = 1
How can I do this?
I appreciate your help!
Sebastian
Accepted Answer
More Answers (0)
Categories
Find more on Linear and Nonlinear Regression 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!