comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/mirgetrange.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:cc4b1211e677
1 function r = mirgetrange(x)
2
3 if isempty(x)
4 r = {};
5 return
6 end
7
8 if isstruct(x)
9 fields = fieldnames(x);
10 for f = 1:length(fields)
11 d.(fields{f}) = mirgetrange(x.(fields{f}));
12 end
13 return
14 end
15
16 if iscell(x)
17 x = x{1};
18 end
19 v = get(x,'Data');
20 if isa(x,'mirscalar')
21 m = get(x,'Mode');
22 end
23
24 if isa(x,'mirclassify')
25 d = get(x,'Data');
26 return
27 end
28
29 if isa(x,'miremotion')
30 return
31 end
32
33 if isa(x,'mirsimatrix')
34 return
35 end
36
37 pv = get(x,'PeakVal');
38 if not(isempty(pv)) && not(isempty(pv{1})) && not(isempty(pv{1}{1}))
39 d = uncell(pv);
40 else
41 d = uncell(v,isa(x,'mirscalar'));
42 end
43
44 if not(iscell(d))
45 d = {d};
46 end
47 r = [];
48 for i = 1:length(d)
49 r = [r;d{i}(:)];
50 end
51 r = sort(r);