annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirautocor/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 aa = set(a,varargin)
wolffd@0 2 % SET Set properties for the MIRautocor object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 f = a.freq;
wolffd@0 7 s = a.ofspectrum;
wolffd@0 8 w = a.window;
wolffd@0 9 nw = a.normalwindow;
wolffd@0 10 d = mirdata(a);
wolffd@0 11 d = set(d,'Title',get(a,'Title'),'Abs',get(a,'Abs'),'Ord',get(a,'Ord'));
wolffd@0 12 while length(propertyArgIn) >= 2,
wolffd@0 13 prop = propertyArgIn{1};
wolffd@0 14 val = propertyArgIn{2};
wolffd@0 15 propertyArgIn = propertyArgIn(3:end);
wolffd@0 16 switch prop
wolffd@0 17 case 'Coeff'
wolffd@0 18 d = set(d,'Data',val);
wolffd@0 19 case 'Delay'
wolffd@0 20 d = set(d,'Pos',val);
wolffd@0 21 case 'FreqDomain'
wolffd@0 22 f = val;
wolffd@0 23 case 'OfSpectrum'
wolffd@0 24 s = val;
wolffd@0 25 case 'Window'
wolffd@0 26 w = val;
wolffd@0 27 case 'LowRemoved'
wolffd@0 28 lr = val;
wolffd@0 29 otherwise
wolffd@0 30 d = set(d,prop,val);
wolffd@0 31 end
wolffd@0 32 end
wolffd@0 33 aa.freq = f;
wolffd@0 34 aa.ofspectrum = s;
wolffd@0 35 aa.window = w;
wolffd@0 36 aa.normalwindow = nw;
wolffd@0 37 aa = class(aa,'mirautocor',d);