Info
This question is closed. Reopen it to edit or answer.
Generate all combinations of matrix for given vectors of column
1 view (last 30 days)
Show older comments
I have 2 vectors a & b. Assume a = 1 : 1 : 10 & b = 100 : 100 : 1000. Required matrix of the form 10 x 2. Each row consists of 2 rows namely, a & b. Here I would like to generate all combinations of matrices.
Example, x1 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100 ]
x2 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 200 ]
x3 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 300 ]
.
.
.
x10 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 1000 ]
x11 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 2 100 ]
x12 = [ 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 1 100; 2 200 ]
Like wise code has to generate 10 ^20 matrices one by one, so that i don't want store these matrices in memory. I will use generated matrix and use it for my computation and generate next matrix.
1 Comment
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!