Convert text cell to double
1 view (last 30 days)
Show older comments
Tristan Payer
on 14 Nov 2015
Commented: Tristan Payer
on 14 Nov 2015
hi, I have a Cell array like
'$88.10'
'$83.01'
'$80.22'
'$80.22'
how can I convert it to an array of doubles ?
Thanks
Tristan
0 Comments
Accepted Answer
Andrei Bobrov
on 14 Nov 2015
z = {'$88.10'
'$83.01'
'$80.22'
'$80.22'};
out = cellfun(@(x)str2double(x(2:end)),z);
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!