comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirtemporal/set.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function tt = set(t,varargin)
2 % SET Set properties for the MIRtemporal object
3 % and return the updated object
4
5 propertyArgIn = varargin;
6 c = t.centered;
7 b = t.nbits;
8 d = mirdata(t);
9 d = set(d,'Title',get(t,'Title'),'Abs',get(t,'Abs'),'Ord',get(t,'Ord'));
10 while length(propertyArgIn) >= 2,
11 prop = propertyArgIn{1};
12 val = propertyArgIn{2};
13 propertyArgIn = propertyArgIn(3:end);
14 switch prop
15 case 'Time'
16 d = set(d,'Pos',val);
17 case 'Centered'
18 c = val;
19 case 'NBits'
20 b = val;
21 otherwise
22 d = set(d,prop,val);
23 end
24 end
25 tt.centered = c;
26 tt.nbits = b;
27 tt = class(tt,'mirtemporal',d);