annotate 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
rev   line source
wolffd@0 1 function tt = set(t,varargin)
wolffd@0 2 % SET Set properties for the MIRtemporal object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 c = t.centered;
wolffd@0 7 b = t.nbits;
wolffd@0 8 d = mirdata(t);
wolffd@0 9 d = set(d,'Title',get(t,'Title'),'Abs',get(t,'Abs'),'Ord',get(t,'Ord'));
wolffd@0 10 while length(propertyArgIn) >= 2,
wolffd@0 11 prop = propertyArgIn{1};
wolffd@0 12 val = propertyArgIn{2};
wolffd@0 13 propertyArgIn = propertyArgIn(3:end);
wolffd@0 14 switch prop
wolffd@0 15 case 'Time'
wolffd@0 16 d = set(d,'Pos',val);
wolffd@0 17 case 'Centered'
wolffd@0 18 c = val;
wolffd@0 19 case 'NBits'
wolffd@0 20 b = val;
wolffd@0 21 otherwise
wolffd@0 22 d = set(d,prop,val);
wolffd@0 23 end
wolffd@0 24 end
wolffd@0 25 tt.centered = c;
wolffd@0 26 tt.nbits = b;
wolffd@0 27 tt = class(tt,'mirtemporal',d);