Syntax
ez=ezofT([T])
Input Parameter
Output Parameter
Examples
ezofT(TofR([0 pi/2 pi/4]))
Copyright 2022-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)
This function, ezofT
, is designed to extract the ez
vector from a homogeneous transformation (HT) matrix, specifically a Denavit-Hartenberg (DH) matrix, and return it as a row vector.
Input Parameters
- T: A 4x4 DH matrix. If not provided, the function defaults to the identity matrix
eye(4)
.
Output Results
- ez: The third column of the matrix
T
, specifically the first three elements, transposed into a row vector. This represents the z
-axis direction of the transformation.
Algorithm Steps
- Retrieve the input parameter
T
using the helper function getfuncparams
. If no input is provided, use the identity matrix eye(4)
.
- Extract the
ez
vector by taking the first three elements of the third column of T
and transpose it to form a row vector.
- If no output is requested (
nargout==0
), visualize the transformation:
- Call
SGfigure
to set up a figure with a range from -30 to 30.
- Use
tplot
to plot the transformation matrix T
with a scale factor of 2 and label it as 'T'.
- Plot the
ez
vector using lplot
, starting from the translation part of T
and extending in the direction of ez
, colored green, with a line width of 2, and label it as 'e_z'.
Algorithm explaination created using ChatGPT on 2025-08-18 22:07. (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