random vector generator

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?

 Respuesta aceptada

Walter Roberson
Walter Roberson el 19 de Sept. de 2011

0 votos

meshgrid(A,B,C,D) or ndgrid(A,B,C,D) can do this for you.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by