www.gusucode.com > mbc 工具箱 matlab 源码程序 > mbc/@junit/isempty.m
function TrueFalse = isempty(UnitObj) %ISEMPTY % Copyright 2000-2007 The MathWorks, Inc. %JUNIT/ISEMPTY True for an a junit constructed with an empty string. % ISEMPTY(UnitObj) returns 1 if UnitObj is uninitialised (constructed with % an empty string) and 0 otherwise. % % See also GET. % --------------------------------------------------------------------------- % Description : Method to test if a junit was a difference junit is % uninitialised (constructed with an empty string). % Inputs : UnitObj - junit object (junit) % Outputs : TrueFalse - true or false (integer) % --------------------------------------------------------------------------- ReshapedUnitObj = UnitObj(:); TrueFalse = zeros(size(ReshapedUnitObj)); for ucount = 1:length(ReshapedUnitObj), % Step through TrueFalse(ucount) = isempty(ReshapedUnitObj(ucount).Constructor); end TrueFalse = reshape(TrueFalse, size(UnitObj));