random vector generator

조회 수: 1 (최근 30일)
Nam Nguyen
Nam Nguyen 2011년 9월 19일
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?

채택된 답변

Walter Roberson
Walter Roberson 2011년 9월 19일
meshgrid(A,B,C,D) or ndgrid(A,B,C,D) can do this for you.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by