Code covered by the BSD License  

Highlights from
cell2str

4.66667

4.7 | 3 ratings Rate this file 81 Downloads (last 30 days) File Size: 1.53 KB File ID: #13999

cell2str

by Per-Anders Ekstrom

 

19 Feb 2007 (Updated 20 Feb 2007)

Convert a 2-D cell array of strings to a string in MATLAB syntax.

| Watch this File

File Information
Description

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'';}'.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
06 May 2008 Alfredo IƱigo

aa

22 May 2008 Virginia Woods

Works great. Thanks

06 Jan 2009 Craig Derian

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

Please login to add a comment or rating.
Updates
20 Feb 2007

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

Tag Activity for this File
Tag Applied By Date/Time
structures Per-Anders Ekstrom 22 Oct 2008 09:01:04
cell arrays Per-Anders Ekstrom 22 Oct 2008 09:01:04
cell string mat2str Per-Anders Ekstrom 22 Oct 2008 09:01:04
cell arrays Sascha 08 Jan 2009 03:34:43
cell string mat2str Harsha Kasi 17 Jul 2009 07:39:52
cell arrays Harsha Kasi 17 Jul 2009 07:39:55
structures Harsha Kasi 17 Jul 2009 07:39:57
cell string mat2str Sergios 22 Jun 2010 08:52:52
structures Johann 02 Feb 2011 12:15:01
cell arrays Johann 02 Feb 2011 12:15:04
cell arrays hihiza 02 Mar 2011 10:05:36

Contact us at files@mathworks.com