How to calculate intersection between the domains of two functions?

3 次查看(过去 30 天)
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 个评论
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.

请先登录,再进行评论。

更多回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by