Syntax
is=isequalT(TA,TB,[check,thr])
Input Parameter
TA : | | HT Matrix A |
TB : | | HT Matrix B |
check : | | letters of distances to check default is 'pz' |
thr : | | default 1e-4; |
Output Parameter
Examples
isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]))
isequalT(eye(4),TofR(rot(0,0,pi/10),[0 0 1]),'l')
isequalT(eye(4),TofR(rot(0,pi,pi/10),[0 0 1]),'l')
Copyright 2020-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
The function isequalT
compares two 4x4 homogeneous transformation matrices, TA
and TB
, to determine if they are approximately equal based on specified criteria.
Input Parameters
- TA: A 4x4 homogeneous transformation matrix.
- TB: Another 4x4 homogeneous transformation matrix to compare with
TA
.
- check: A string specifying which aspects of the matrices to compare. Default is 'pz'. Possible values:
- 'p': Check the distance of the origins.
- 'z': Check the angle difference of the ez vectors.
- 'y': Check the angle difference of the ey vectors.
- 'l': Check the straight line distance angle of ez.
- thr: A threshold value for comparison. Default is 1e-4.
Output Results
- is: A logical value indicating if the matrices are approximately equal based on the specified criteria.
- delta: The difference between the matrices as calculated by the
diffT
function.
Algorithm Steps
- Retrieve the
check
parameter from varargin
, defaulting to 'pz'. Convert it to lowercase.
- Retrieve the
thr
parameter from varargin
, defaulting to 1e-4.
- Initialize
is
to true
.
- Calculate the difference between
TA
and TB
using diffT
, storing the result in delta
.
- Check each specified aspect in
check
:
- If 'p' is included and
delta(1)
exceeds thr
, set is
to false
.
- If 'z' is included and
delta(2)
exceeds thr
, set is
to false
.
- If 'y' is included and
delta(3)
exceeds thr
, set is
to false
.
- If 'l' is included and
delta(4)
exceeds thr
, set is
to false
.
- If no output arguments are specified, plot the matrices
TA
and TB
using SGfigure
and tplot
.
Algorithm explaination created using ChatGPT on 2025-08-19 07:18. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21