cell2mat simple manipulation question
1 view (last 30 days)
Show older comments
Hi, if x={'000','101.5'}; x2=cell2mat(x)% which is =000101.5
How can I get x2=[000 , 101.5]?
0 Comments
Accepted Answer
Sean de Wolski
on 25 Jul 2012
How about:
x={'000','101.5'};
x2=str2double(x)
or:
x3 = cellfun(@str2double,x)
0 Comments
More Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!