isequalT

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.0, Creation date: 2020-12-30, Last change: 2025-09-15

returns the difference between 2 4x4 HT matrices

Description

p checks the distance of the origins
z checks the distance angle of the ez vectors
y checks the distance angle of the ey vectors
l checks the straight line distance angle of ez

See Also: diffangle , diffT , uniqueT

Example Illustration

 missing image of isequalT(TA,TB,check,thr)

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

is: logical true

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

Output Results

Algorithm Steps

  1. Retrieve the check parameter from varargin, defaulting to 'pz'. Convert it to lowercase.
  2. Retrieve the thr parameter from varargin, defaulting to 1e-4.
  3. Initialize is to true.
  4. Calculate the difference between TA and TB using diffT, storing the result in delta.
  5. 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.
  6. 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