bndonoff.m

来自「机器人控制仿真程序一书的所有源代码」· M 代码 · 共 34 行

M
34
字号
function bndonoff
% BNDONOFF Bound buttons. (Utility Function)
%          BNDONOFF 'turns on' and 'turns off' the bound which the user
%          has selected using the push buttons on the  side of the IDE
%          environment in LPSHAPE and DLPSHAPE.

% Author: Craig Borghesani
% 10/10/93
% Copyright (c) 1995-98 by The MathWorks, Inc.
%       $Revision: 1.4 $

f=gcf;
obj=get(f,'currentobject');

% obtain the handles to all the lines that make up the selected bound
bnddata=get(obj,'userdata');

str=get(obj,'string');
if strcmp('On',str) | strcmp('Off',str),
 if strcmp(str,'On'),
  set(bnddata(bnddata~=0),'vis','on');
  set(obj,'string','Off');
 else
  set(bnddata(bnddata~=0),'vis','off');
  set(obj,'string','On');
 end
else
 if strcmp(get(bnddata(1),'vis'),'on'),
  set(bnddata(bnddata~=0),'vis','off');
 else
  set(bnddata(bnddata~=0),'vis','on');
 end
end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?