annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirpitch/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
rev   line source
Daniel@0 1 function pp = set(p,varargin)
Daniel@0 2 % SET Set properties for the MIRpitch object
Daniel@0 3 % and return the updated object
Daniel@0 4
Daniel@0 5 propertyArgIn = varargin;
Daniel@0 6 a = p.amplitude;
Daniel@0 7 s = mirscalar(p);
Daniel@0 8 while length(propertyArgIn) >= 2,
Daniel@0 9 prop = propertyArgIn{1};
Daniel@0 10 val = propertyArgIn{2};
Daniel@0 11 propertyArgIn = propertyArgIn(3:end);
Daniel@0 12 switch prop
Daniel@0 13 case 'Amplitude'
Daniel@0 14 a = val;
Daniel@0 15 otherwise
Daniel@0 16 s = set(s,prop,val);
Daniel@0 17 end
Daniel@0 18 end
Daniel@0 19 pp.amplitude = a;
Daniel@0 20 pp = class(pp,'mirpitch',s);