Code covered by the BSD License  

Highlights from
SUBMREDUCE - submatrix reduce

Be the first to rate this file! 1 Download (last 30 days) File Size: 1.71 KB File ID: #16206

SUBMREDUCE - submatrix reduce

by Dan Ellis

 

01 Sep 2007 (Updated 02 Sep 2007)

Apply a function to all values in submatrices to return a smaller matrix.

| Watch this File

File Information
Description

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].

MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
matrices Dan Ellis 22 Oct 2008 09:25:25
submatrix reduce min max sum map apply map feval Dan Ellis 22 Oct 2008 09:25:25

Contact us at files@mathworks.com