steep decay curve fitting

1 回表示 (過去 30 日間)
Allan Ye
Allan Ye 2016 年 8 月 27 日
回答済み: Star Strider 2016 年 8 月 28 日
hi All,
I have a set of data would like to fit with some simple functions. Can someone please help?
Thanks, Allan
X 100 213 453 969 2070 3133 4741 7175 10859 16436 24877 37652 56989 80499 100000
Y 4711 1872 891 496 315 262 227 205 191 182 176 171 166 164 162

回答 (1 件)

Star Strider
Star Strider 2016 年 8 月 28 日
One possibility (of an infinite number of possible models):
X = [100 213 453 969 2070 3133 4741 7175 10859 16436 24877 37652 56989 80499 100000];
Y = [4711 1872 891 496 315 262 227 205 191 182 176 171 166 164 162];
f = @(b,x) b(1).*exp(b(2).*x) + b(3);
SSECF = @(b) sum((Y - f(b,X)).^2);
[B,SSE] = fminsearch(SSECF, [5000; -1; 1]);
xv = linspace(min(X), max(X));
figure(1)
plot(X, Y, 'bp', xv, f(B,xv), '-r')
grid
The best model is one that accurately describes the process that produced your data. Only you know what that process is.

カテゴリ

Help Center および File ExchangeLinear and Nonlinear Regression についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by