Azzera filtri
Azzera filtri

Convert string form to array form on Matlab

2 visualizzazioni (ultimi 30 giorni)
hang dong
hang dong il 29 Mag 2019
Risposto: Jan il 29 Mag 2019
How to convert string form into array and from array to string on Matlab?
exam : '1234' ---> [1 2 3 4]
[1 2 3 4] --> '1234'

Risposte (2)

madhan ravi
madhan ravi il 29 Mag 2019
sprintf('%d',1234)
str2double('1234')

Jan
Jan il 29 Mag 2019
[1 2 3 4] --> '1234' :
x = [1,2,3,4]
s = sprintf('%d', x)
'1234' ---> [1 2 3 4] :
s = '1234';
x = s - '0'

Categorie

Scopri di più su Data Type Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by