annotate toolboxes/MIRtoolbox1.3.2/MIRToolbox/@mirsimatrix/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 mm = set(m,varargin)
wolffd@0 2 % SET Set properties for the MIRsimatrix object
wolffd@0 3 % and return the updated object
wolffd@0 4
wolffd@0 5 propertyArgIn = varargin;
wolffd@0 6 graph = m.graph;
wolffd@0 7 branch = m.branch;
wolffd@0 8 d = mirdata(m);
wolffd@0 9 while length(propertyArgIn) >= 2,
wolffd@0 10 prop = propertyArgIn{1};
wolffd@0 11 val = propertyArgIn{2};
wolffd@0 12 propertyArgIn = propertyArgIn(3:end);
wolffd@0 13 switch prop
wolffd@0 14 case 'Graph'
wolffd@0 15 graph = val;
wolffd@0 16 case 'Branch'
wolffd@0 17 branch = val;
wolffd@0 18 otherwise
wolffd@0 19 d = set(d,prop,val);
wolffd@0 20 end
wolffd@0 21 end
wolffd@0 22 mm.diagwidth = m.diagwidth;
wolffd@0 23 mm.view = m.view;
wolffd@0 24 mm.similarity = m.similarity;
wolffd@0 25 mm.graph = graph;
wolffd@0 26 mm.branch = branch;
wolffd@0 27 mm = class(mm,'mirsimatrix',d);