Home > brede > brede_mat_submatrix.m

brede_mat_submatrix

PURPOSE ^

brede_mat_submatrix - Pick out submatrix

SYNOPSIS ^

function Mout = brede_mat_submatrix(Min, varargin)

DESCRIPTION ^

 brede_mat_submatrix  - Pick out submatrix

       Mout = brede_mat_submatrix(Min, 'PropertyName', 'PropertyValue') 

       Input:    Min     'Mat' structure

       Property: Columns [ integer | {size(Min.matrix,2)} |
                         allnnan ] indices
                         for columns. The default is all columns
                 Description   String for description of structure
                 Rows    [ integer | {size(Min.matrix,1)} |
                         allnnan ] indices for
                         rows. The default is all rows

       Output:   Mout    Submatrix as 'mat' structure

       Construct a submatrix from a matrix.

       The 'rows' and 'columns' properties should speficify the
       row and column indices to include.

       If 'rows'='allnnan' then all rows without any NaN in each
       the column element will be included in the output. Also if
       'columns'='allnnan' all columns withon any NaN in each of
       the row element will be extracted to the output.

       Example:
         m = [1 10 100 1000]'*[ 1 2 3]
         M = brede_mat_submatrix(m, 'Columns', [2 3])
         M.matrix

         M = brede_mat_submatrix(m, 'Rows', [3 1], 'Columns', [2 3])
         M.matrix

         m(2,3) = NaN
         M = brede_mat_submatrix(m, 'Rows', 'allnnan')
         M.matrix

       See also BREDE, BREDE_MAT, BREDE_SUR_SUBSURFACE, BREDE_UI_MAT.

 $Id: brede_mat_submatrix.m,v 1.9 2009/08/04 11:53:31 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