Borrar filtros
Borrar filtros

(somewhat) specifying coefficients for curve fitting

1 visualización (últimos 30 días)
J.S.
J.S. el 28 de Jun. de 2018
Respondida: Walter Roberson el 28 de Jun. de 2018
I have a set of data that I am fitting with the modified ("custom", because it has offsets) two-exponential fit a*exp(b*(x-x0))+c*exp(d*(x-x0))+y0. Offsets x0 and y0 are known. From my data, I know what the upper and lower bounds for a-d should be, and I have imposed these constraints in my code. Since I do not precisely know what starting values for a-d I should set, I am leaving that to MATLAB's random start point selection. However, one disadvantage is that, between any two fit attempts, not only will the values for a-d be different, but also a might be bigger than c in one fit, and then at the next attempt, a is smaller than c. This result then influences whether b is bigger than d or b is smaller than d. Since I need to perform fitting multiple times to find distributions (via histograms) of b and d, this could be a problem. Is there some way I can tell MATLAB that a should be bigger than c, regardless of MATLAB's chosen start points?
Thanks very much in advance!

Respuesta aceptada

Walter Roberson
Walter Roberson el 28 de Jun. de 2018
No, there is not. However, you can use
FitFcn = @(a,b,c,d,x) RealFitFcn(max(a,c), b, min(a,c), d, x)

Más respuestas (0)

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Productos


Versión

R2015b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by