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?

 Accepted Answer

Walter Roberson
Walter Roberson on 19 Sep 2011

0 votes

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

More Answers (0)

Categories

Tags

Community Treasure Hunt

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

Start Hunting!