wolffd@0: function b = isamir(x,class) wolffd@0: wolffd@0: if isempty(x) || isnumeric(x) wolffd@0: b = 0; wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: if iscell(x) wolffd@0: x = x{1}; wolffd@0: end wolffd@0: wolffd@0: if isa(x,class) wolffd@0: b = 1; wolffd@0: return wolffd@0: elseif ischar(x) && strcmpi(class,'miraudio') wolffd@0: b = 1; wolffd@0: return wolffd@0: elseif not(isa(x,'mirdesign')) wolffd@0: b = 0; wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: type = get(x,'Type'); wolffd@0: if iscell(type) wolffd@0: type = type{1}; wolffd@0: end wolffd@0: types = lineage(type); wolffd@0: b = 0; wolffd@0: i = 0; wolffd@0: while not(b) && i