File Exchange

image thumbnail

gblk: a pedestrian data block extractor

version (32.2 KB) by us
gblk computes segment/offset parameters for very fast extraction of data blocks from a matrix


Updated 27 Apr 2007

View License

GBLK computes index templates of the form
for very fast extraction of data blocks from 2d matrices of any type.

data blocks can be non-, partial-, or fully overlapping.

the output can be reused to extract data from other matrices of the same size.

the templates can be modified to extract only selected data blocks and/or to extract only selected values from a data block.

CELLFUN can be used to compute further results from the extracted data blocks

> help gblk
and the accompanying published M-file for info and a few self-explanatory examples.

an ND version of GBLK will be posted soon.

Cite As

us (2020). gblk: a pedestrian data block extractor (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)


This work is very nice application and documentation. Program graphical technique and algorithm is very usefully and I will use the similarly technique for automatic mesh function on 2D or 3D dimensional areas, more thanks.

Good works, Best regards.

Urs (us) Schwarz

i've had several questions re GBLKPLT.
please note, this is a utility specifically designed for GBLKDEMO as clearly stated in its help-section - and NOT a general purpose function. it ONLY is guaranteed to work with matrices of the type used in the demo file (numerical, char, cell of chars)

Y Yupik

Y Yupik

Sam K

Sam K

MATLAB Release Compatibility
Created with R2007a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!