フィルターのクリア

Is there a way to find the area between to graphs in simulink?

3 ビュー (過去 30 日間)
Peter Lyngbye
Peter Lyngbye 2022 年 12 月 13 日
回答済み: Fangjun Jiang 2022 年 12 月 14 日
I have two graphs, where i want to find the area between them in Simulink. However i cant seem to find out how to do it. Is there a way to do this in the scope, or how can this be achieved.
It is the area between the blue and yellow graph, and in between the white lines.
Best regards
  1 件のコメント
Askic V
Askic V 2022 年 12 月 13 日
Well, I would use toWorkspace in SImulink and export these variables to workspace. Then I would perform integration there by writing appropriate script.
https://www.mathworks.com/help/simulink/slref/toworkspace.html#responsive_offcanvas

サインインしてコメントする。

回答 (1 件)

Fangjun Jiang
Fangjun Jiang 2022 年 12 月 14 日
In Simulink, subtract yellow signal from the blue signal and then feed it to an integrator block. That will give you the area between the two lines. Note that there will be a positive/negative sign and the integration might cancel each other.
You could take the absolute value after the subtraction if you truly want the "area".
You could use triggered subsystem to calculate the area between the two while lines (on time axle), or do it manually by subtracting the integration value at those two time points.

カテゴリ

Help Center および File ExchangeSignal Operations についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by