File Exchange

image thumbnail

SUBMREDUCE - submatrix reduce

version (1.71 KB) by Dan Ellis
Apply a function to all values in submatrices to return a smaller matrix.

1 Download

Updated 02 Sep 2007

View License

Y = SUBMREDUCE(X,R,C,F) treats the 2D matrix X as consisting of submatrices of RxC rows and columns, and returns a smaller matrix with one value derived from each of these submatrices.
That value is obtained by applying the function pointed to by F to a matrix where the all the submatrix values have been arranged in columns - i.e. the standard syntax for functions such as MIN() and SUM().

Example: if X = [1 2 3 4; 5 6 7 8] then SUBMREDUCE(X,2,2,@sum) = [14 22].

Cite As

Dan Ellis (2020). SUBMREDUCE - submatrix reduce (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

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