Convert text of multiple digits to numbers
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
saeed
am 31 Jul. 2014
Bearbeitet: saeed
am 5 Aug. 2014
if i have a variable x containing in each row something like this :
- 123123123
- 123798731
- 234874343
if i use class(x) it prints char . and if i write cellstr(x) i get :
- ' 123123123 '
- ' 123798731 '
- ' 234874343 '
how can i convert x to column of numbers so :
1- each row is a number meaning x(1) = 123123123 and not 1.
2- i would be able to use meshgrid(x,x) and i would get the output :
123123123 123798731 234874343
123123123 123798731 234874343
123123123 123798731 234874343
thanks
0 Kommentare
Akzeptierte Antwort
Azzi Abdelmalek
am 31 Jul. 2014
A={' 123123123 '
' 123798731 '
' 234874343 '}
str2double(A)
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!