Home > atmlab > math > istensor2.m

istensor2

PURPOSE ^

ISTENSOR2 True for matrix (tensor 2) variables.

SYNOPSIS ^

function bool = istensor2( a )

DESCRIPTION ^

 ISTENSOR2   True for matrix (tensor 2) variables.

    Determines if a variable is a matrix, that is, a numeric of size mxn 
    where n or m (or both) can be equal to 1.

 FORMAT   bool = istensor2(a)
        
 OUT   bool   true if matrix, else false.
 IN    a      A variable of any data type.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

istensor2.m

SOURCE CODE ^

0001 % ISTENSOR2   True for matrix (tensor 2) variables.
0002 %
0003 %    Determines if a variable is a matrix, that is, a numeric of size mxn
0004 %    where n or m (or both) can be equal to 1.
0005 %
0006 % FORMAT   bool = istensor2(a)
0007 %
0008 % OUT   bool   true if matrix, else false.
0009 % IN    a      A variable of any data type.
0010 
0011 % 2005-03-16  Created by Patrick Eriksson.
0012 
0013 
0014 function bool = istensor2( a )
0015 
0016 bool = isnumeric( a )  &&  dimens(a) <= 2;
0017 
0018

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