wolffd@0: function r = mirgetrange(x) wolffd@0: wolffd@0: if isempty(x) wolffd@0: r = {}; wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: if isstruct(x) wolffd@0: fields = fieldnames(x); wolffd@0: for f = 1:length(fields) wolffd@0: d.(fields{f}) = mirgetrange(x.(fields{f})); wolffd@0: end wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: if iscell(x) wolffd@0: x = x{1}; wolffd@0: end wolffd@0: v = get(x,'Data'); wolffd@0: if isa(x,'mirscalar') wolffd@0: m = get(x,'Mode'); wolffd@0: end wolffd@0: wolffd@0: if isa(x,'mirclassify') wolffd@0: d = get(x,'Data'); wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: if isa(x,'miremotion') wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: if isa(x,'mirsimatrix') wolffd@0: return wolffd@0: end wolffd@0: wolffd@0: pv = get(x,'PeakVal'); wolffd@0: if not(isempty(pv)) && not(isempty(pv{1})) && not(isempty(pv{1}{1})) wolffd@0: d = uncell(pv); wolffd@0: else wolffd@0: d = uncell(v,isa(x,'mirscalar')); wolffd@0: end wolffd@0: wolffd@0: if not(iscell(d)) wolffd@0: d = {d}; wolffd@0: end wolffd@0: r = []; wolffd@0: for i = 1:length(d) wolffd@0: r = [r;d{i}(:)]; wolffd@0: end wolffd@0: r = sort(r);