Hello, I've plot 5 lines on the same graph with their edge coordinates. Now, I wish to find the intersection point coordinates (xi, yi) from any 2 intersecting lines specifically. Example: Intersection point between bottom slanting line and horizontal straight line.I used polyxpoly function, but it's not working...Is there any better way to do this?. Thank you.
%Bottom slanting line
x1=[1000,1];
y1=[1E-8, 1E-5];
loglog(x1,y1)
hold on
%Top slanting line
x2=[1,3000];
y2=[1E-3,3.5E-7];
loglog(x2,y2)
hold on
%First vertical straight line
x3=[1000, 1000];
y3=[1E-9, 1E-6];
loglog(x3,y3)
hold on
%Second vertical straight line
x4=[3000,3000];
y4=[3.5E-7,1E-9];
loglog(x4,y4)
hold on
%Horizontal straight line
x5=[1,5000];
y5=[3.98E-7,3.98E-7];
loglog(x5,y5)
%Find intersection point
[xi,yi]=polyxpoly(x1,y1,x5,y5)
mapshow(xi,yi,'DisplayType','point','Marker','o')

 채택된 답변

KSSV
KSSV 2021년 6월 14일

1 개 추천

You can consider using this file exchange to find the point of intersections.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by