TLA=cell2matdim3(TL)
TL : | Cell list of frames |
TLA : | Array format of Frames |
PL=PLsquare(40), TcopyVLez(PL);TL=ans;
TLC=mat2celldim3(TL)
TLL=cell2mat(TLC)
TLA=cell2matdim3(TLC)
TLC=mat2celldim3(TLL)
TLA=cell2matdim3(TLC)
This function, cell2matdim3
, is designed to convert a cell list of frames into an array format. It is part of the SG-Library and was developed by Tim Lueth in 2022. The function is used to handle 4x4 homogeneous transformation matrices, which are common in robotics and computer graphics for representing transformations in 3D space.
TL
is a row vector. If it is, transpose it to ensure it is a column vector. This is done using the condition if size(TL,1)==1; TL=TL'; end;
.TL
into a long list format using cell2mat(TL)
. This concatenates all 4x4 matrices into a single long matrix TLL
.TLL
into a 3D array format TLA
using the following operations:
TLL
by 90 degrees using rot90(TLL)
.reshape(...,4,4,[])
.rot90(...,-1)
to obtain the final array format TLA
.This function is useful for converting between different representations of transformation matrices, particularly when working with lists of transformations in 3D space.
Algorithm explaination created using ChatGPT on 2025-08-19 01:03. (Please note: No guarantee for the correctness of this explanation)