cell2mat simple manipulation question

2 visualizzazioni (ultimi 30 giorni)
Hi, if x={'000','101.5'}; x2=cell2mat(x)% which is =000101.5
How can I get x2=[000 , 101.5]?

Risposta accettata

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

Più risposte (0)

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by