Home > atmlab > math > istensor1.m

istensor1

PURPOSE ^

ISTENSOR1 True for vector (tensor 1) variables.

SYNOPSIS ^

function bool = istensor1( a )

DESCRIPTION ^

 ISTENSOR1   True for vector (tensor 1) variables.

    Determines if a variable is a vector, that is, a numeric of size mx1 
    where m can be equal to 1.

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

istensor1.m

SOURCE CODE ^

0001 % ISTENSOR1   True for vector (tensor 1) variables.
0002 %
0003 %    Determines if a variable is a vector, that is, a numeric of size mx1
0004 %    where m can be equal to 1.
0005 %
0006 % FORMAT   bool = istensor1(a)
0007 %
0008 % OUT   bool   true if vector, 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 = istensor1( a )
0015 
0016 bool = isempty(a) || (isnumeric(a) && size(a,1) >=0 && size(a,2) <= 1 && ndims(a)==2);

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