Coordinate Transformation Conversion
R2026bConvert to a specified coordinate transformation representation
Libraries:
Robotics System Toolbox /
Utilities
Navigation Toolbox /
Utilities
ROS Toolbox /
Utilities
UAV Toolbox /
Utilities
Description
The Coordinate Transformation Conversion block converts a coordinate transformation from one representation to another. The Coordinate Transformation Conversion block can convert a single or multiple transformations. For a single transformation, the input and output transformations use these representations.
Vector representations:
Axis-Angle (
AxAng) —[x;y;z;theta]Euler Angles (
Eul) — Three-element vector[z;y;x]Quaternion (
Quat) —[w;x;y;z]Translation Vector (
TrVec) —[x;y;z]
Matrix representations:
Homogeneous Transformation (
TForm) — 4-by-4 matrixRotation Matrix (
RotM) — 3-by-3 matrix
For multiple transformations, the input and output transformations use these representations.
d-by-N matrix, where each column vector is a single transformation of length d. N is the number of transformations.
M-by-M-by-N array, where each M-by-M page of the array is a single transformation.
To accommodate representations that only contain position or orientation information
(TrVec or Eul, for example), you can specify
two inputs or outputs to handle all transformation information. When you select the
Homogeneous Transformation as an input or output, the optional Show TrVec
input port or Show TrVec output port parameters
can be selected on the block mask to toggle the multiple ports.
Examples
Ports
Input
Output Arguments
Parameters
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"robotutilslib/Coordinate Transformation Conversion"
"navlib/Utilities/Coordinate Transformation Conversion"
"roslib/Utilities/Coordinate Transformation Conversion"
"uavutilslib/Coordinate Transformation Conversion"
Example: add_block("robotutilslib/Coordinate Transformation Conversion","myModel/myBlock",MakeNameUnique="on")

