comparison toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirscalar/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 MIRscalar object
3 % and return the updated object
4
5 propertyArgIn = varargin;
6 m = s.mode;
7 l = s.legend;
8 p = s.parameter;
9 d = mirdata(s);
10 d = set(d,'Title',get(s,'Title'),'Abs',get(s,'Abs'),'Ord',get(s,'Ord'));
11 while length(propertyArgIn) >= 2,
12 prop = propertyArgIn{1};
13 val = propertyArgIn{2};
14 propertyArgIn = propertyArgIn(3:end);
15 switch prop
16 case 'Mode'
17 m = val;
18 case 'Legend'
19 l = val;
20 case 'Parameter'
21 p = val;
22 otherwise
23 d = set(d,prop,val);
24 end
25 end
26 ss.mode = m;
27 ss.legend = l;
28 ss.parameter = p;
29 ss = class(ss,'mirscalar',d);