Computing the error between two curves of a figure

2 ビュー (過去 30 日間)
Saleh Msaddi
Saleh Msaddi 2021 年 1 月 7 日
回答済み: Monisha Nalluru 2021 年 1 月 11 日
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

回答 (1 件)

Monisha Nalluru
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

カテゴリ

Help Center および File ExchangeBlock Libraries についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by