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

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2015년 11월 14일

0 개 추천

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2015년 11월 14일

댓글:

2015년 11월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by