Home > @link > showlink.m

showlink

PURPOSE ^

SHOWLINK show all parameters of LINK object

SYNOPSIS ^

function showlink(l)

DESCRIPTION ^

SHOWLINK show all parameters of LINK object

    SHOWLINK(link)

 Display all parameters, including all defined inertial parameters, for the
 link object.

 See also: ROBOT/SHOWLINK, LINK.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 %SHOWLINK show all parameters of LINK object
0002 %
0003 %    SHOWLINK(link)
0004 %
0005 % Display all parameters, including all defined inertial parameters, for the
0006 % link object.
0007 %
0008 % See also: ROBOT/SHOWLINK, LINK.
0009 
0010 % Copyright (C) 1999-2008, by Peter I. Corke
0011 %
0012 % This file is part of The Robotics Toolbox for Matlab (RTB).
0013 %
0014 % RTB is free software: you can redistribute it and/or modify
0015 % it under the terms of the GNU Lesser General Public License as published by
0016 % the Free Software Foundation, either version 3 of the License, or
0017 % (at your option) any later version.
0018 %
0019 % RTB is distributed in the hope that it will be useful,
0020 % but WITHOUT ANY WARRANTY; without even the implied warranty of
0021 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0022 % GNU Lesser General Public License for more details.
0023 %
0024 % You should have received a copy of the GNU Leser General Public License
0025 % along with RTB.  If not, see <http://www.gnu.org/licenses/>.
0026 
0027 function showlink(l)
0028 
0029     llab = 6;
0030     for n =fieldnames(l)'
0031         v = getfield(l, char(n));
0032         name = char(n);
0033         spaces = char(' '*ones(1,llab-length(name)));
0034         if min(size(v)) == 1,
0035             val = num2str(v(:)');
0036         else
0037             val = num2str(v);
0038         end
0039         label = [name spaces ' = '];
0040         if numrows(val) > 1,
0041             pad = {label; char(' '*ones(numrows(val)-1,1))};
0042         else
0043             pad = label;
0044         end
0045         disp([char(pad) val]);
0046     end

Generated on Sun 15-Feb-2009 18:09:29 by m2html © 2003