www.gusucode.com > rfblksmasks 工具箱matlab源码程序 > rfblksmasks/rfblksflagnoplot.m
function Udata = rfblksflagnoplot(block, Udata, set_userdata) %RFBLKSFLAGNOPLOT Set Udata.Plot to false when parameters are invalid. % RFBLKSFLAGNOPLOT sets Udata.Plot to false and saves Udata by storing it % in the userdata of the block. If an output block is connected to the % cascade where this block exists, the function also sets the Plot flag % to false and stores it in the userdata of the output block. % % If the SET_USERDATA flag is false, then the function only sets the Plot % flag to false and stores it in the userdata of the output block. The % only usage of this case is in the delete block callback. % Copyright 2007 The MathWorks, Inc. if nargin < 3 set_userdata = true; end if set_userdata Udata.Plot = false; set_param(block, 'UserData', Udata); end if isfield(Udata, 'OutputPortBlock') && ~isempty(Udata.OutputPortBlock) try OutputPortUdata = get_param(Udata.OutputPortBlock, 'UserData'); if isfield(OutputPortUdata, 'Plot') && OutputPortUdata.Plot OutputPortUdata.Plot = false; set_param(Udata.OutputPortBlock, 'UserData', OutputPortUdata); dialog = rfblksfinddialog(Udata.OutputPortBlock); if ~isempty(dialog) dialog.refresh; end end catch end end