I have the ideal point (500,700) and the calculated point (499.79,700.44). I want to calculate the error but i can't. Please help me out
1 回表示 (過去 30 日間)
古いコメントを表示
clc
clear
Idealpoint=(500,700)
calculatedpoint=(499.79,700.44)
error=?
回答 (2 件)
José-Luis
2014 年 6 月 11 日
absolute_error = mean(abs((observed(:) - simulated(:)) ./ observed(:)) .* 100)
0 件のコメント
Star Strider
2014 年 6 月 12 日
How I would do it:
Idealpoint = [500,700];
calculatedpoint=[499.79,700.44];
pct_abs_err = 100 * abs((Idealpoint-calculatedpoint)./Idealpoint)
produces:
pct_abs_err =
42.0000e-003 62.8571e-003
2 件のコメント
Star Strider
2014 年 6 月 12 日
The usual practice is to calculate the error for each one.
If you want the combined error, I suppose taking the mean of both would work:
pct_abs_err = mean(100 * abs((Idealpoint-calculatedpoint)./Idealpoint))
参考
カテゴリ
Help Center および File Exchange で Time Series についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!