How to find intersection of several data sets?

8 次查看(过去 30 天)
I have 50 sets of (x, y) points, and each set contains handreds of points, I am trying to find the intersection points between the 50 data sets at once. Is there a function that can do the task?

回答(1 个)

KSSV
KSSV 2021-7-7
  2 个评论
Ayham Aljawabrah
Ayham Aljawabrah 2021-8-9
I have tested the function with the following code and got tje seen results
I have used 3 date sets . For two data sets , I got the expected results but for the three data sets, I got strange results where I created the varaible L according to the instructions provided, to combine the 3 data sets. can you tell me the problem
p1=[1 2 3 4;...
1 2 3 4];
p2=[2 3 8 1 55;...
2 5 1 1 31];
p3=[1 2 44 33;...
1 2 33 22];
L=[p1(1,:) NaN p2(1,:) NaN p3(1,:);...
p1(2,:) NaN p2(2,:) NaN p3(2,:)]
L = 2×15
1 2 3 4 NaN 2 3 8 1 55 NaN 1 2
1 2 3 4 NaN 2 5 1 1 31 NaN 1 2
pinx=InterX(L)
pinx = 2×2
4.4706 5.1311
3.8235 3.2951
pinx2=InterX(p1,p2)
pinx2 = 2×2
1 2
1 2
pimx3=InterX(p1,p2,p3)
Error using InterX (line 46)
Too many input arguments.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by