INV Invert a unit-quaternion QI = inv(Q) Return the inverse of the unit-quaternion Q.
0001 %INV Invert a unit-quaternion 0002 % 0003 % QI = inv(Q) 0004 % 0005 % Return the inverse of the unit-quaternion Q. 0006 % 0007 0008 % Copyright (C) 1999-2008, by Peter I. Corke 0009 % 0010 % This file is part of The Robotics Toolbox for Matlab (RTB). 0011 % 0012 % RTB is free software: you can redistribute it and/or modify 0013 % it under the terms of the GNU Lesser General Public License as published by 0014 % the Free Software Foundation, either version 3 of the License, or 0015 % (at your option) any later version. 0016 % 0017 % RTB is distributed in the hope that it will be useful, 0018 % but WITHOUT ANY WARRANTY; without even the implied warranty of 0019 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0020 % GNU Lesser General Public License for more details. 0021 % 0022 % You should have received a copy of the GNU Leser General Public License 0023 % along with RTB. If not, see <http://www.gnu.org/licenses/>. 0024 0025 function qi = inv(q) 0026 0027 qi = quaternion([q.s -q.v]);