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.
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);