Fitting data to integral function
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi everybody. I'm trying to fit an essemble of data ("r" as x and "texp" as y) by a function defined by an integral:
FC*integral(@(x)exp(-a./x.*log(x)),1,texp)
, were both "FC" and "a" are the parameters to fit, while "texp" are the upper integration limits, which must be equal to the "y" parameters at each point.
Thank you so much !
2 Kommentare
Torsten
am 4 Jun. 2018
So you have data (xi,yi) that should be representable by
(texp(i),FC*integral(@(x)exp(-a./x.*log(x)),1,texp(i)))
?
Walter Roberson
am 4 Jun. 2018
What should the expression equal?? Is it
texp = FC*integral(@(x)exp(-a./x.*log(x)),1,texp)
?
Where is your independent variable?
Antworten (2)
Sergio Quesada
am 4 Jun. 2018
1 Kommentar
Walter Roberson
am 4 Jun. 2018
Where is your independent variable appearing in the model? Is texp(r) intended to convey "the texp that corresponds to r", or is texp somehow intended to be both a function to be applied to r on the left side, but a particular numeric value on the right hand side where it is acting as the upper bounds of the integral ?
Or is texp(r) intended to be multiplication, as in
texp(K) * r(K) == FC * integral(@(x)exp(-a./x.*log(x), 1, texp(K))
and thus
texp(K) == FC / r(K) * integral(@(x)exp(-a./x.*log(x), 1, texp(K))
Sergio Quesada
am 4 Jun. 2018
Bearbeitet: Sergio Quesada
am 4 Jun. 2018
12 Kommentare
Walter Roberson
am 4 Jun. 2018
fun = @(FCa, r) arrayfun(@(R) FCa(1) * integral(@(x) exp(-FCa(2)./(x.*log(x))), 1, R), r);
FCa = lsqcurvefit(fun, x0, r, texp);
FC = FCa(1); a = FCa(2);
Siehe auch
Kategorien
Mehr zu Descriptive Statistics finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!