Daniel@0: function tt = set(t,varargin) Daniel@0: % SET Set properties for the MIRtemporal object Daniel@0: % and return the updated object Daniel@0: Daniel@0: propertyArgIn = varargin; Daniel@0: c = t.centered; Daniel@0: b = t.nbits; Daniel@0: d = mirdata(t); Daniel@0: d = set(d,'Title',get(t,'Title'),'Abs',get(t,'Abs'),'Ord',get(t,'Ord')); Daniel@0: while length(propertyArgIn) >= 2, Daniel@0: prop = propertyArgIn{1}; Daniel@0: val = propertyArgIn{2}; Daniel@0: propertyArgIn = propertyArgIn(3:end); Daniel@0: switch prop Daniel@0: case 'Time' Daniel@0: d = set(d,'Pos',val); Daniel@0: case 'Centered' Daniel@0: c = val; Daniel@0: case 'NBits' Daniel@0: b = val; Daniel@0: otherwise Daniel@0: d = set(d,prop,val); Daniel@0: end Daniel@0: end Daniel@0: tt.centered = c; Daniel@0: tt.nbits = b; Daniel@0: tt = class(tt,'mirtemporal',d);