Filter löschen
Filter löschen

How to calculate intersection between the domains of two functions?

3 Ansichten (letzte 30 Tage)
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 Kommentare
Mr. 206
Mr. 206 am 8 Okt. 2018
And is there a way to find out the common area between two graphs?
Torsten
Torsten am 8 Okt. 2018
Bearbeitet: Torsten am 8 Okt. 2018
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)

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

KSSV
KSSV am 8 Okt. 2018
Bearbeitet: KSSV am 8 Okt. 2018
delta = max(g)-min(f)
I mean, the value of g at y maximum - the value of f at y minimum.
  8 Kommentare
KSSV
KSSV am 9 Okt. 2018
Alternatively you can use InterX an file exchange function to get the intersection points.
Mr. 206
Mr. 206 am 9 Okt. 2018
Can you please explain your code?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by