Mercurial > hg > camir-aes2014
annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirkeysom/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 cc = set(c,varargin) |
wolffd@0 | 2 % SET Set properties for the MIRchromagram object |
wolffd@0 | 3 % and return the updated object |
wolffd@0 | 4 |
wolffd@0 | 5 propertyArgIn = varargin; |
wolffd@0 | 6 d = mirdata(c); |
wolffd@0 | 7 d = set(d,'Title',get(c,'Title'),'Abs',get(c,'Abs'),'Ord',get(c,'Ord')); |
wolffd@0 | 8 while length(propertyArgIn) >= 2, |
wolffd@0 | 9 prop = propertyArgIn{1}; |
wolffd@0 | 10 val = propertyArgIn{2}; |
wolffd@0 | 11 propertyArgIn = propertyArgIn(3:end); |
wolffd@0 | 12 switch prop |
wolffd@0 | 13 case 'Weight' |
wolffd@0 | 14 d = set(d,'Data',val); |
wolffd@0 | 15 otherwise |
wolffd@0 | 16 d = set(d,prop,val); |
wolffd@0 | 17 end |
wolffd@0 | 18 end |
wolffd@0 | 19 cc = class(struct,'mirkeysom',d); |