Borrar filtros
Borrar filtros

Find intersection points between lines

3 visualizaciones (últimos 30 días)
HAINGKHARRAN GUNASEKARAN
HAINGKHARRAN GUNASEKARAN el 14 de Jun. de 2021
Comentada: HAINGKHARRAN GUNASEKARAN el 14 de Jun. de 2021
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')

Respuesta aceptada

KSSV
KSSV el 14 de Jun. de 2021
You can consider using this file exchange to find the point of intersections.

Más respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by