function setset( h, propName, propValue ) %SETSET Do a SET on Handle Graphics object or a SET_PARAM on Simulink object. % SETSET(H, NAME, VALUE ) SET/SET_PARAM property pair on HG and/or SL objects H. % SETSET(N, NAME, VALUE ) SET_PARAM property pair on Simulink object named N. % For Simulink models it ignores Lock settings. % % See also SET, SET_PARAM. % Copyright 1984-2002 The MathWorks, Inc. % $Revision: 1.1 $ $Date: 2006/10/05 17:00:15 $ if isempty(h) return end ish = ishghandle(h); hg = h(ish); if ~isempty(hg) if iscell(propValue) %Vectorize SET not used because propValue may vary per object values = propValue( logical(ish) ); if length(hg) ~= length(values) error( 'Inconsistent number of objects and property values.' ) end for i = 1:length(hg) set( hg(i), propName, values{i} ) end else set( hg, propName, propValue ) end end