annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirpitch/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 pp = set(p,varargin)
wolffd@0 2 % SET Set properties for the MIRpitch object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 a = p.amplitude;
wolffd@0 7 s = mirscalar(p);
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 'Amplitude'
wolffd@0 14 a = val;
wolffd@0 15 otherwise
wolffd@0 16 s = set(s,prop,val);
wolffd@0 17 end
wolffd@0 18 end
wolffd@0 19 pp.amplitude = a;
wolffd@0 20 pp = class(pp,'mirpitch',s);