Plot - show fitting error
8 ビュー (過去 30 日間)
古いコメントを表示
Hi,
Starting with a set of data points, I use a fitfun function to fit it to a nonlinear scaling function A^x.
Now, I would like to quantify the error of the fits themselves, to understand how the points deviate from the scaling function.
May I ask for any help to do this?
Thanks!
0 件のコメント
回答 (1 件)
darova
2019 年 3 月 5 日
A = 1.9;
x = linspace(0,4,50);
y = A.^x + rand(1,50);
res = fit(x',y','A.^x');
y1 = res.A.^x;
plot(x,y,'.',x,y1)
legend('data','fit')
figure
title('Error')
plot(x,y1-y)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!