Convert text cell to double

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

 采纳的回答

z = {'$88.10'
'$83.01'
'$80.22'
'$80.22'};
out = cellfun(@(x)str2double(x(2:end)),z);

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by