Generating combination of matrix with 3 elements
1 view (last 30 days)
Show older comments
Commented: Shourya on 15 Mar 2022
I want to optimally generate a 100 matrix, of size MxN using the combination of 3 elements (0,1,2) and save them into seperate mat files. Can someone please help. I dont want to generate the matrix randomly.
David Hill on 16 Feb 2022
Edited: David Hill on 16 Feb 2022
So each row of 12 elements can only contain the elements [0 1 2] ? Are there any other contrains? How many times can each element be repeated in each row? Why don't you want to generate the matrix randomly?
A=[repmat([0 1 2],1,12)];
More Answers (0)
Find more on Elementary Math in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!