intersection point between 2-d plot and a line

조회 수: 7 (최근 30일)
Mike Lee
Mike Lee 2017년 3월 27일
답변: Robert Alvarez 2017년 3월 27일
Hi,
I have 2-d plot that is based on data (two vectors) and a horizontal line function (using fplot).
I am trying to find intersection point of outer most line of 2-d plot(blue) and red line, in other words I want to get the intersection point where red line hits the first and the last. Then I want to find difference between intersection points of x axes, that is x2 - x1. How should I proceed?
Thank you
  댓글 수: 1
Robert Alvarez
Robert Alvarez 2017년 3월 27일
Try the PolylineIntersectSegment.m explained in this blog post:

댓글을 달려면 로그인하십시오.

답변 (1개)

Robert Alvarez
Robert Alvarez 2017년 3월 27일
Whoops, put my answer in the comment:
Try the PolylineIntersectSegment.m explained in this blog post:

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by