Convert german numbers from excel to matlab (change comma versus point)
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Steffen Thomas
am 28 Sep. 2022
Kommentiert: Steffen Thomas
am 29 Sep. 2022
I have copied a series of numbers from a German Excel. The comma is there as a decimal point. Now I want to read the numbers into Mathlab and I have also made a way. Unfortunately, it doesn't work with numbers of type xx,0x because I go over a two-column matrix and the leading zero in the second column disappears.
Is there a way to implement the following input in such a way that numbers are read in immediately?
Example:
experi=[
28,97
54,76
65,01
80,56
52,90
];
As result experi (or a converted array) should be real, like:
exper=[
28.97
54.76
65.01
80.56
52.90
];
Can anybody help me please?
2 Kommentare
Steven Lord
am 28 Sep. 2022
How are you reading the data into MATLAB, what function or workflow (the Import Data tool in the Toolstrip?) are you using?
Akzeptierte Antwort
Fabio Freschi
am 28 Sep. 2022
You may try to use readtable to import your data. It reads excel files and has the option 'DecimalSeparator' that can be set to ','
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spreadsheets 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!