www.gusucode.com > mbctools 工具箱 matlab 源码程序 > mbctools/@sweepsetfilter/setCacheState.m
function [obj] = setCacheState(obj, cacheState) %SETCACHESTATE A short description of the function % % OUT = SETCACHESTATE(IN) % % Copyright 2000-2007 The MathWorks, Inc. and Ford Global Technologies, Inc. % Deal with a string state first if ischar(cacheState) cacheState = strcmp(cacheState, 'on'); end if (isnumeric(cacheState) || islogical(cacheState)) && numel(cacheState) == 1 % Update the internal flag obj.allowsCacheing = logical(cacheState); % And update the object obj = pUpdateCache(obj); else error(message('mbc:sweepsetfilter:InvalidArgument8')); end