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