matlab - What is the inverse of cellstr()? -
i have:
s = ['abc '; 'defg'; 'hi ']; % s 3x4 char c = cellstr(s) % c 3x1 cell c = 'abc' 'defg' 'hi' how can s c? say, inverse of cellstr()?
you can utilize char(c):
s = ['abc '; 'defg'; 'hi ']; % s 3x4 char c = cellstr(s) % c 3x1 cell c = 'abc' 'defg' 'hi' s2 = char(c) % s2 3x4 char all(all(s == s2)) ans = 1 % s , s2 identical matlab
No comments:
Post a Comment