Filter löschen
Filter löschen

How to find intersection of several data sets?

7 Ansichten (letzte 30 Tage)
Ayham Aljawabrah
Ayham Aljawabrah am 7 Jul. 2021
Kommentiert: KSSV am 10 Aug. 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?

Antworten (1)

KSSV
KSSV am 7 Jul. 2021
  2 Kommentare
Ayham Aljawabrah
Ayham Aljawabrah am 9 Aug. 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 am 10 Aug. 2021
You should give only two inputs at once.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by