?? setallfieldvalues.m
字號:
function setallfieldvalues(block)%SETALLFIELDVALUES Set field numbers and mask values in the callers workspace.%% The field numbers will have the same name (and case) as the mask variable % names, BUT they will have their first initial capitalized and preceded % by 'idx'. For example a Dialog variable 'fooBar' creates an index % called 'idxFooBar' % % The mask parameter values are set in a similar fashion except that a % mask variable called 'fooBar' will be called 'maskFoobar' in the % callers workspace. % Copyright 1996-2001 The MathWorks, Inc.% $Revision: 1.3 $ $Date: 2001/04/05 04:47:27 $ evalStr1 = ''; evalStr2 = ''; wsStr = get_param(block,'MaskWSVariables'); MN = deal({wsStr.Name}); for n=1:length(MN) varName = [upper(MN{n}(1)) MN{n}(2:end)]; evalStr1 = [evalStr1 sprintf('idx%s = %d;', varName, n)]; evalStr2 = [evalStr2 sprintf('assignin(''caller'', ''mask%s'', wsStr(%d).Value);', varName, n)]; end; evalin('caller',evalStr1); eval(evalStr2);return;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -