How to set bounds for coefficents when fitting Exponential?
Afficher commentaires plus anciens
I'd like to give boundary for coefficient(a, b and c). Whenever I run my fitting, it should give the coefficients within boundary. For instance, I want to get only b value of over 200 below 400.
I'm trying to make it with 'fitoptions', but it doesn't work in a code.
How should I do for that?
I attached my data file for example.
A=xlsread('A.xlsx');
t=A(:,1);
i=A(:,2)/10^(2);
ft = fittype('a*exp(-x/b)+c');
%options = fitoptions('ft', 'lower',[100000 400 10000], 'upper',[0 200 0]);
F=fit(t,i,ft) %, options)
General model:
F(x) = a*exp(-x/b)+c
Coefficients (with 95% confidence bounds):
a = 5.558e+04 (5.525e+04, 5.591e+04)
b = 373.5 (366.4, 380.7)
c = 5.171e+04 (5.135e+04, 5.207e+04)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with Curve Fitting Toolbox dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!