comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mircepstrum/set.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function ss = set(s,varargin)
2 % SET Set properties for the MIRcepstrum object
3 % and return the updated object
4
5 propertyArgIn = varargin;
6 p = s.phase;
7 f = s.freq;
8 d = mirdata(s);
9 d = set(d,'Title',get(s,'Title'),'Abs',get(s,'Abs'),'Ord',get(s,'Ord'));
10 while length(propertyArgIn) >= 2,
11 prop = propertyArgIn{1};
12 val = propertyArgIn{2};
13 propertyArgIn = propertyArgIn(3:end);
14 switch prop
15 case 'Magnitude'
16 d = set(d,'Data',val);
17 case 'Phase'
18 p = val;
19 case 'Quefrency'
20 d = set(d,'Pos',val);
21 case 'FreqDomain'
22 f = val;
23 otherwise
24 d = set(d,prop,val);
25 end
26 end
27 ss.phase = p;
28 ss.freq = f;
29 ss = class(ss,'mircepstrum',d);