cell2str(a,varargin​)

this function aims to convert a cell matrix to a char matrix.
119 Downloads
Updated 10 Sep 2015

View License

%CELL2STR converts string cell matrice to string matrice with padded blanks
%in a flush-left style. this function is mainly used for string matrix display.
%
%for example:
%a={{'a'} {'aa'} {'aaa'};{'aa'} {'aaa'} {'a'};{'aaa'} {'a'} {'aa'}};
%or
%a=[{'a'} {'aa'} {'aaa'};{'aa'} {'aaa'} {'a'};{'aaa'} {'a'} {'aa'}];
%cell2str(a) returns:
%ans =
%a aa aaa
%aa aaa a
%aaa a aa
%
%input arguments:
%a: string cell matrix of cell depth up to 2;
%n: number of delimiters(a single white blank)between row elements.

Cite As

Ramoflaple (2026). cell2str(a,varargin) (https://www.mathworks.com/matlabcentral/fileexchange/52919-cell2str-a-varargin), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Cell Arrays in Help Center and MATLAB Answers
Tags Add Tags
Version Published Release Notes
2.0.0.0

add three different display styles, i.e. flush-left, flush-right, center.

1.0.0.0