Home > brede > brede_mat_mean.m

brede_mat_mean

PURPOSE ^

brede_mat_mean - Mean of matrix

SYNOPSIS ^

function Mout = brede_mat_mean(Min, varargin)

DESCRIPTION ^

 brede_mat_mean       - Mean of matrix

       Input:    Min   'Mat' structure

       Property: Type  [ {ColumnMean} | PeelingColumnCentroid | 
                       RowMean ] Type of mean

       Output:   Mout  'Mat' structure

       The mean of a matrix. Non-a-numbers (NaN) are ignored for
       'ColumnMean' and 'RowMean'.

       'Type'='ColumnMean' results in a row vector while
       'Type'='RowMean' results in a column vector. 

       Example: 
         brede_mat_mean(rand(5,10), 'type', 'columnmean')

         % Scale a random matrix by its row mean
         M = brede_mat_mat2mat(randn(100,100));
         M1 = brede_mat_divide(M, brede_mat_mean(M, 'type', 'rowmean'));
         M2 = brede_mat_scale(M, 'type', 'rowmean');
         figure, plot(M1.matrix(:), M2.matrix(:), '.')

       See also BREDE, BREDE_MAT, BREDE_LOC, BREDE_MAT_CENTER,
                BREDE_MAT_DIVIDE, BREDE_MAT_SCALE, BREDE_MAT_SUM,
                BREDE_LOC_MEDIAN, BREDE_VOL_VOLUMEMEAN.

 $Id: brede_mat_mean.m,v 1.9 2008/02/28 23:10:02 fn Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005