# How to find intersection of several data sets?

2 ビュー (過去 30 日間)
Ayham Aljawabrah 2021 年 7 月 7 日
コメント済み: KSSV 2021 年 8 月 10 日
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 2021 年 7 月 7 日
##### 2 件のコメントなしを表示なしを非表示
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.
KSSV 2021 年 8 月 10 日
You should give only two inputs at once.

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

### カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

R2020a

### Community Treasure Hunt

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

Start Hunting!

Translated by