How to find all possible 8x8 submatrices of a 13x8 matrix?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuesta aceptada
Torsten
el 4 de Ag. de 2022
r = nchoosek(1:13,8);
A = rand(13,8);
for i = 1:size(r,1)
B(:,:,i) = A(r(i,:),:);
end
size(B)
Ver también
Categorías
Más información sobre Multidimensional Arrays en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!