annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirenvelope/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 ee = set(e,varargin)
wolffd@0 2 % SET Set properties for the MIRenvelope object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 ds = e.downsampl;
wolffd@0 7 hw = e.hwr;
wolffd@0 8 df = e.diff;
wolffd@0 9 mt = e.method;
wolffd@0 10 ph = e.phase;
wolffd@0 11 t = mirtemporal(e);
wolffd@0 12 t = set(t,'Title',get(e,'Title'),'Abs',get(e,'Abs'),'Ord',get(e,'Ord'));
wolffd@0 13 while length(propertyArgIn) >= 2,
wolffd@0 14 prop = propertyArgIn{1};
wolffd@0 15 val = propertyArgIn{2};
wolffd@0 16 propertyArgIn = propertyArgIn(3:end);
wolffd@0 17 switch prop
wolffd@0 18 case 'DownSampling'
wolffd@0 19 ds = val;
wolffd@0 20 case 'Halfwave'
wolffd@0 21 hw = val;
wolffd@0 22 case 'Diff'
wolffd@0 23 df = val;
wolffd@0 24 otherwise
wolffd@0 25 t = set(t,prop,val);
wolffd@0 26 end
wolffd@0 27 end
wolffd@0 28 ee.downsampl = ds;
wolffd@0 29 ee.hwr = hw;
wolffd@0 30 ee.diff = df;
wolffd@0 31 ee.method = mt;
wolffd@0 32 ee.phase = ph;
wolffd@0 33 ee = class(ee,'mirenvelope',t);