cellstradjustlen

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - CODING/DEVELOP
Introduced first in SolidGeometry 5.6, Creation date: 2025-09-16, Last change: 2025-09-18

adjust in each col of acell array or table the length of char string


Use carefully: The 'cellstradjustlen' function has not yet been extensively tested

Description

works with cell cols und tabel cols
required for cell2mat, since some positive matlab concepts have changed over time.

See Also:

Example Illustration

 missing image of cellstradjustlen(OCC)

Syntax

CC=cellstradjustlen(OCC)

Input Parameter

OCC: Original cell array or table

Output Parameter

CC: cell array or table in which all strings of a column have the same length

Examples


cell2mat({'A';'A B'; 'A B C'; 'A D'}) % fails adjust strlen in column
cellstradjustlen({'A';'A B'; 'A B C'; 'A D'}) % adjust strlen in column
cell2mat(cellstradjustlen({'A';'A B'; 'A B C'; 'A D'})) % does work now




Copyright 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

Last html export of this page out of FM database by TL: 2025-09-21