www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@xregdesign/setuserfixed.m
function des = setuserfixed(des, idx, isfixed) %SETUSERFIXED Mark design points as fixed by the user % % OUT = SETUSERFIXED(DES, IDX) marks the design points indicated by the % index IDX as being "fixed". This means that the data should not be % edited or removed. % IDX can be either a vector of design point indices or a logical vector % the same length as the design. % % OUT = SETUSERFIXED(DES, IDX, ISFIXED) specifies whether the indicated % points should be fixed (ISFIXED=true) or unfixed (ISFIXED=false). % Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin<3 if islogical(idx) % Set the 1:Nth points to have these states isfixed = idx; idx = 1:length(idx); else % Set the specified points to be flagged as true isfixed = true; end end flags = pGetFlags(des, 'FIXED'); flags(idx) = isfixed; des = pSetFlags(des, 'FIXED', flags);