Using exp2 in fit

4 次查看(过去 30 天)
Elizabeth
Elizabeth 2014-8-8
Hi there,
I managed to fit my data to exp2 pretty nicely using the code:
f1 = fit(z,Tz,'exp2');
I wanted to try something else, by fitting the same data into the sum of a linear and exponential function because I realized my first exponential in the 'exp2' fit is essentially linear, i.e. a*x + b*exp(c*x) + d
I defined the model as such, but the fit gave me a completely different line: model = @(a, b, c, d, x) a*x + b*exp( c*x ) + d; f2 = fit( z, Tz,model);
I have a feeling it has to do with my startpoint, reason being that when I tried: model = @(a, b, c, d, x) a*exp(b*x) + c*exp( d*x ); f2 = fit( z, Tz,model); I was getting some bad fitting as well.
So I guess my question is, how does fit(z, Tz, 'exp2') , figure out the startpoint and produces such a nice fit to my data?
Thanks! Elizabeth

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by