Dividing a Matrix into submatrices
이전 댓글 표시
I am having a problem using the "mat2cell" command. I have a image with row x col and I would like to divide that into a set of 10(row)x3(col) basic cell region matrices.They are grouped horizontally and vertically and then five basic cell regions are grouped together. In the end I have to calculate cumulative sums over each group.
Can anyone help, please? I am new to Matlab
답변 (1개)
Walter Roberson
2013년 3월 12일
[rows, cols, panes] = size(YourMatrix);
YourCell = mat2cell( YourMatrix, row/10 * ones(1, 10), cols/3 * ones(1, 3), panes );
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!