random vector generator

1 visualizzazione (ultimi 30 giorni)
Nam Nguyen
Nam Nguyen il 19 Set 2011
Hi!
I apologize ahead of time for my lack of terminology, I am new Matlab. I am trying to make a matrix that contain all of the possible variations, not combinations, of the vector
R = [ A B C D ]
where
A = [ 1 2 3 4 ]
B = [ 5 6 7 8 ]
C = [ 9 10 11 12]
D = [13 14 15 16]
Would someone be able to help?

Risposta accettata

Walter Roberson
Walter Roberson il 19 Set 2011
meshgrid(A,B,C,D) or ndgrid(A,B,C,D) can do this for you.

Più risposte (0)

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by