Helper function which converts a table/dataset to a compactly formatted character representation (in analogy to NUM2STR). It also makes the table more human readable by only showing the relevant digits, removing unnecessary zeros, the boldfont control commands added in the TABLE display and more.
The function can handle multi-dimensional columns of many types. The string representation is useful for storing the table in a text file or appending it to other text data (e.g. as UserData in a figure).
David J. Mack (2022). table2char(data,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/58951-table2char-data-varargin), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!