extract matrix from matrix

2 次查看(过去 30 天)
Jitesh Bhanushali
Jitesh Bhanushali 2014-3-28
i have matrix of 256*256 n i want to extract first 4*4 matrix of every 8*8 blocks of 256*256 matrix

回答(1 个)

Azzi Abdelmalek
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 个评论
Jitesh Bhanushali
Jitesh Bhanushali 2014-3-29
i want to join that 4*4 matrix into a sigle matrix

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by