File Exchange

image thumbnail

cell2str

version 1.0.0.0 (1.53 KB) by Per-Anders Ekstrom
Convert a 2-D cell array of strings to a string in MATLAB syntax.

27 Downloads

Updated 20 Feb 2007

View License

STR = CELL2STR(CELLSTR) converts the 2-D cell-string CELLSTR to a MATLAB string so that EVAL(STR) produces the original cell-string.
Works as corresponding MAT2STR but for cell array of strings instead of scalar matrices.

Example
cellstr = {'U-234','Th-230'};
cell2str(cellstr) produces the string '{''U-234'',''Th-230'';}'.

Cite As

Per-Anders Ekstrom (2020). cell2str (https://www.mathworks.com/matlabcentral/fileexchange/13999-cell2str), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (6)

super useful! Thanks

Add

works good to convert cells to a string.

Valentina

Great job! it speeded up my work. Thanks!!

Craig Derian

took some small mods to work for structure dynamic field name creation, but very nice

Virginia Woods

Works great. Thanks

Alfredo Iñigo

aa

Updates

1.0.0.0

Updated bug if any string in cell-string consisted of a '-character.

MATLAB Release Compatibility
Created with R2006a
Compatible with any release
Platform Compatibility
Windows macOS Linux