Find intersection points between lines

3 ビュー (過去 30 日間)
HAINGKHARRAN GUNASEKARAN
HAINGKHARRAN GUNASEKARAN 2021 年 6 月 14 日
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 日
You can consider using this file exchange to find the point of intersections.
  1 件のコメント
HAINGKHARRAN GUNASEKARAN
HAINGKHARRAN GUNASEKARAN 2021 年 6 月 14 日
Thank you again, it worked!!!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by