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