extract matrix from matrix
조회 수: 5 (최근 30일)
이전 댓글 표시
i have matrix of 256*256 n i want to extract first 4*4 matrix of every 8*8 blocks of 256*256 matrix
댓글 수: 0
답변 (1개)
Azzi Abdelmalek
2014년 3월 28일
편집: Azzi Abdelmalek
2014년 3월 29일
Edit
A=rand(256) % Example
idx=1:8:256
[jj,ii]=meshgrid(idx,idx)
B=cell2mat(arrayfun(@(ii,jj) A(ii:ii+3,jj:jj+3),ii,jj,'un',0))
댓글 수: 8
참고 항목
카테고리
Help Center 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!