Borrar filtros
Borrar filtros

cell2mat simple manipulation question

1 visualización (últimos 30 días)
Danielle Leblanc
Danielle Leblanc el 25 de Jul. de 2012
Hi, if x={'000','101.5'}; x2=cell2mat(x)% which is =000101.5
How can I get x2=[000 , 101.5]?

Respuesta aceptada

Sean de Wolski
Sean de Wolski el 25 de Jul. de 2012
How about:
x={'000','101.5'};
x2=str2double(x)
or:
x3 = cellfun(@str2double,x)

Más respuestas (0)

Categorías

Más información sobre Data Type Conversion en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by