ISHOMOG Test if argument is a homogeneous transformation H = ISHOMOG(TR) Returns true (1) if the argument tr is of dimension 4x4.
0001 %ISHOMOG Test if argument is a homogeneous transformation 0002 % 0003 % H = ISHOMOG(TR) 0004 % 0005 % Returns true (1) if the argument tr is of dimension 4x4. 0006 0007 % Copyright (C) 2008, by Peter I. Corke 0008 % 0009 % This file is part of The Robotics Toolbox for Matlab (RTB). 0010 % 0011 % RTB is free software: you can redistribute it and/or modify 0012 % it under the terms of the GNU Lesser General Public License as published by 0013 % the Free Software Foundation, either version 3 of the License, or 0014 % (at your option) any later version. 0015 % 0016 % RTB is distributed in the hope that it will be useful, 0017 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0018 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0019 % GNU Lesser General Public License for more details. 0020 % 0021 % You should have received a copy of the GNU Leser General Public License 0022 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0023 0024 function h = isrot(r) 0025 if ndims(r) == 2, 0026 h = all(size(r) == [3 3]); 0027 else 0028 h = 0; 0029 end