Cell array of coordinates from two vectors
Ältere Kommentare anzeigen
I have two vectors, one with 119 X values and a one with 102 Y values. I'm trying to work out a way to combine these to create to all possible unique sets of coordinates (12,138 unique coordinates). I could use two nested for loops to do it, but it's very slow. I'm struggling to find if theres any combination of matlab functions that could achieve this.
1 Kommentar
KSSV
am 5 Okt. 2018
Have a look on perms
Akzeptierte Antwort
Weitere Antworten (1)
Raghunandan V
am 5 Okt. 2018
you should you at least one nested loop
for k=1:length(X)
z=[X(k) Y'];
perms(Z);
end
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!