Azzera filtri
Azzera filtri

How to calculate intersection between the domains of two functions?

3 visualizzazioni (ultimi 30 giorni)
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 Commenti
Mr. 206
Mr. 206 il 8 Ott 2018
And is there a way to find out the common area between two graphs?
Torsten
Torsten il 8 Ott 2018
Modificato: Torsten il 8 Ott 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)

Accedi per commentare.

Risposta accettata

KSSV
KSSV il 8 Ott 2018
Modificato: KSSV il 8 Ott 2018
delta = max(g)-min(f)
I mean, the value of g at y maximum - the value of f at y minimum.
  8 Commenti
KSSV
KSSV il 9 Ott 2018
Alternatively you can use InterX an file exchange function to get the intersection points.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by