cell2mat simple manipulation question

2 Ansichten (letzte 30 Tage)
Danielle Leblanc
Danielle Leblanc am 25 Jul. 2012
Hi, if x={'000','101.5'}; x2=cell2mat(x)% which is =000101.5
How can I get x2=[000 , 101.5]?

Akzeptierte Antwort

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

Weitere Antworten (0)

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by