by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Kinematics and Frames
Introduced first in SolidGeometry 5.2, Creation date: 2022-12-19, Last change: 2025-09-15
ez=ezofT([T])
T: | DH Matrix 4x4 |
ez: | T(1:3,3)' |
ezofT(TofR([0 pi/2 pi/4]))
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.
eye(4).T, specifically the first three elements, transposed into a row vector. This represents the z-axis direction of the transformation.T using the helper function getfuncparams. If no input is provided, use the identity matrix eye(4).ez vector by taking the first three elements of the third column of T and transpose it to form a row vector.nargout==0), visualize the transformation:
SGfigure to set up a figure with a range from -30 to 30.tplot to plot the transformation matrix T with a scale factor of 2 and label it as 'T'.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'.