How do you bring about all possible combinations from two row vectors?
Afficher commentaires plus anciens
Say for example I have
x=[1 2 3 4] y=[1 2 3 4]
and I wanted to create a new vector z which would give all combinations of the elements of x and y. It would look something like
z=[(1,1) (1,2) (1,3) (1,4) (2,1) (2,2) (2,3) (2,4) (3,1) etc etc]. Is this even possible?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Whos dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!