How to find intersection of several data sets?

7 vues (au cours des 30 derniers jours)
Ayham Aljawabrah
Ayham Aljawabrah le 7 Juil 2021
Commenté : KSSV le 10 Août 2021
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?

Réponses (1)

KSSV
KSSV le 7 Juil 2021
  2 commentaires
Ayham Aljawabrah
Ayham Aljawabrah le 9 Août 2021
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
KSSV le 10 Août 2021
You should give only two inputs at once.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by