www.gusucode.com > mbcview 工具箱matlab源码程序 > mbcview/@cgsurfview/@evalpanel/setautoeval.m

    function setautoeval(obj,newval)
% EVALPANEL/SETAUTOEVAL Accepts either a number or a string.
%
% obj.setautoeval(newval)
%
% Parameter is one of:
%   zero
%   'off'
%   non-zero number
%   'on'

%  Copyright 2000-2004 The MathWorks, Inc. and Ford Global Technologies, Inc.


if ischar(newval)
    if strcmpi(newval,'on')
        obj.autoeval=1;
    else
        obj.autoeval=0;
    end
else
    obj.autoeval=newval;
end