How to calculate intersection between the domains of two functions?

3 vues (au cours des 30 derniers jours)
Mr. 206
Mr. 206 le 8 Oct 2018
Commenté : Mr. 206 le 9 Oct 2018
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 commentaires
Mr. 206
Mr. 206 le 8 Oct 2018
And is there a way to find out the common area between two graphs?
Torsten
Torsten le 8 Oct 2018
Modifié(e) : Torsten le 8 Oct 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)

Connectez-vous pour commenter.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Signal Generation and Preprocessing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by