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