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

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 14 de Nov. de 2015

0 votos

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

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Centro de ayuda y File Exchange.

Preguntada:

el 14 de Nov. de 2015

Comentada:

el 14 de Nov. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by