www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoptimoutput/setAcceptableToExitFlag.m
function obj = setAcceptableToExitFlag(obj, Runs, Sols) %SETACCEPTABLETOEXITFLAG Set acceptability flag to mirror exit status. % % OBJ = SETACCEPTABLETOEXITFLAG(OBJ, RUNS, SOLS) alters the acceptability % flag of the specified runs and solutions to match the status of the % exit flag. Exit flags <=0 are unacceptable solutions. The % "AcceptableChanged" status of the runs and solutions is also reset back % to being false. % Copyright 2006 The MathWorks, Inc. if ischar(Runs) && strcmp(Runs, ':') Runs = 1:getNumRuns(obj); end if ischar(Sols) && strcmp(Sols, ':') Sols = 1:getNumSolutions(obj); end EF = getExitFlag(obj, Runs, Sols); AcceptArray = EF>0; obj = pSetAcceptable(obj, Runs, Sols, AcceptArray); % Reset the flag that indicates whether the user has altered the ACCEPTABLE % flag F = pGetSolutionFlagNames; obj = pSetSolutionFlags(obj, Runs, Sols, F.ACCEPTABLE_USER, false);