Filter löschen
Filter löschen

extract matrix from matrix

2 Ansichten (letzte 30 Tage)
Jitesh Bhanushali
Jitesh Bhanushali am 28 Mär. 2014
Bearbeitet: Azzi Abdelmalek am 29 Mär. 2014
i have matrix of 256*256 n i want to extract first 4*4 matrix of every 8*8 blocks of 256*256 matrix

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 28 Mär. 2014
Bearbeitet: Azzi Abdelmalek am 29 Mär. 2014
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 Kommentare
Jitesh Bhanushali
Jitesh Bhanushali am 29 Mär. 2014
i want to join that 4*4 matrix into a sigle matrix
Azzi Abdelmalek
Azzi Abdelmalek am 29 Mär. 2014

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by