How to calculate intersection between the domains of two functions?

4 ビュー (過去 30 日間)
Mr. 206
Mr. 206 2018 年 10 月 8 日
コメント済み: Mr. 206 2018 年 10 月 9 日
I have two column vectors (f and g). From this two vector how can i calculate the Delta (in picture).
The picture is just an example, I need an universal way to calculate the Delta.
  8 件のコメント
Mr. 206
Mr. 206 2018 年 10 月 8 日
And is there a way to find out the common area between two graphs?
Torsten
Torsten 2018 年 10 月 8 日
編集済み: Torsten 2018 年 10 月 8 日
If x_f and x_g are connected, this should work for the general case:
delta = max(min(max(x_f),max(x_g)) - max(min(x_f),min(x_g)),0)

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

採用された回答

KSSV
KSSV 2018 年 10 月 8 日
編集済み: KSSV 2018 年 10 月 8 日
delta = max(g)-min(f)
I mean, the value of g at y maximum - the value of f at y minimum.
  8 件のコメント
KSSV
KSSV 2018 年 10 月 9 日
Alternatively you can use InterX an file exchange function to get the intersection points.
Mr. 206
Mr. 206 2018 年 10 月 9 日
Can you please explain your code?

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by