![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/484538/image.png)
Computing the error between two curves of a figure
조회 수: 9 (최근 30일)
이전 댓글 표시
Hello,
I have two curves, one corresponding to a real function and the second is its estimated curve.
The whole simulation takes palce in simulink. How can I compute the absolute error between the two curves?
I have attached the figure for your consideration
댓글 수: 0
답변 (1개)
Monisha Nalluru
2021년 1월 11일
Absolute error is the difference of values of signals at the given simulation period.
absolute_error = abs(signal1_value - signal2.value);
In order to achieve this in simulink just add subtraction block between two output signal and resultant output is passed through the Abs block.
As an example, refer to the following model
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/484538/image.png)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Block Libraries에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!