DISPLAY Display the value of a LINK object This method is invoked to display a link object by the Matlab interpreter, and gives a terse single line description of link kinematics. If invoked with a second argument (value ignored) it will display a long form description which includes all defined inertial parameters.
0001 %DISPLAY Display the value of a LINK object 0002 % 0003 % This method is invoked to display a link object by the Matlab interpreter, 0004 % and gives a terse single line description of link kinematics. 0005 % 0006 % If invoked with a second argument (value ignored) it will display a long 0007 % form description which includes all defined inertial parameters. 0008 0009 % Copyright (C) 1999-2008, by Peter I. Corke 0010 % 0011 % This file is part of The Robotics Toolbox for Matlab (RTB). 0012 % 0013 % RTB is free software: you can redistribute it and/or modify 0014 % it under the terms of the GNU Lesser General Public License as published by 0015 % the Free Software Foundation, either version 3 of the License, or 0016 % (at your option) any later version. 0017 % 0018 % RTB is distributed in the hope that it will be useful, 0019 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0020 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0021 % GNU Lesser General Public License for more details. 0022 % 0023 % You should have received a copy of the GNU Leser General Public License 0024 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0025 0026 function display(l, full) 0027 0028 disp(' '); 0029 disp([inputname(1), ' = ']) 0030 disp(' '); 0031 disp([' ' char(l)]) 0032 disp(' '); 0033 0034 if nargin > 1, 0035 if ~isempty(l.m) 0036 fprintf(' m = %f\n', l.m) 0037 end 0038 if ~isempty(l.r) 0039 fprintf(' r = %f %f %f\n', l.r); 0040 end 0041 if ~isempty(l.I) 0042 fprintf(' I = | %f %f %f |\n', l.I(1,:)); 0043 fprintf(' | %f %f %f |\n', l.I(2,:)); 0044 fprintf(' | %f %f %f |\n', l.I(3,:)); 0045 end 0046 if ~isempty(l.Jm) 0047 fprintf(' Jm = %f\n', l.Jm); 0048 end 0049 if ~isempty(l.B) 0050 fprintf(' B = %f\n', l.B); 0051 end 0052 if ~isempty(l.Tc) 0053 fprintf(' Tc = %f(+) %f(-)\n', l.Tc(1), l.Tc(2)); 0054 end 0055 if ~isempty(l.G) 0056 fprintf(' G = %f\n', l.G); 0057 end 0058 if ~isempty(l.qlim) 0059 fprintf(' qlim = %f to %f\n', l.qlim(1), l.qlim(2)); 0060 end 0061 end