How to find all possible 8x8 submatrices of a 13x8 matrix?
3 views (last 30 days)
Show older comments
I have martrix A with size 13x8, and I want to find a list of all the possible 8x8 submatrices combinations of matrix A.
The number of submatrices possible is 13C8 = 1287
Any help is appreciated!
0 Comments
Accepted Answer
Torsten
on 4 Aug 2022
r = nchoosek(1:13,8);
A = rand(13,8);
for i = 1:size(r,1)
B(:,:,i) = A(r(i,:),:);
end
size(B)
See Also
Categories
Find more on Multidimensional Arrays 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!