How to calculate intersection between the domains of two functions?

1 visualización (últimos 30 días)
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 comentarios
Mr. 206
Mr. 206 el 8 de Oct. de 2018
And is there a way to find out the common area between two graphs?
Torsten
Torsten el 8 de Oct. de 2018
Editada: Torsten el 8 de Oct. de 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)

Iniciar sesión para comentar.

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Signal Generation and Preprocessing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by