Mercurial > hg > camir-ismir2012
comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mircepstrum/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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cc4b1211e677 |
---|---|
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); |