Home > atmlab > math > dimens.m

dimens

PURPOSE ^

DIMENS Effective dimension of data

SYNOPSIS ^

function n = dimens(A)

DESCRIPTION ^

 DIMENS  Effective dimension of data

    As *ndims*, but returns 1 for a column vector and 0 for scalar values.

 FORMAT   n = dimens(A)
        
 OUT   n   Dimensionality.
 IN    A   Data (no type check is performed).

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

dimens.m

SOURCE CODE ^

0001 % DIMENS  Effective dimension of data
0002 %
0003 %    As *ndims*, but returns 1 for a column vector and 0 for scalar values.
0004 %
0005 % FORMAT   n = dimens(A)
0006 %
0007 % OUT   n   Dimensionality.
0008 % IN    A   Data (no type check is performed).
0009 
0010 % 2006-08-2   Created by Patrick Eriksson.
0011 
0012 
0013 function n = dimens(A)
0014 
0015 n = max( [ 0 find( size(A) > 1 ) ] );

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005