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에서 Line Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!