Import parts of large comma decimal txt file

1 Ansicht (letzte 30 Tage)
Jørgen Fone Pedersen
Jørgen Fone Pedersen am 4 Mär. 2021
Beantwortet: Jeremy Hughes am 4 Mär. 2021
I need to import parts of a large txt file that looks like this:
I only want the numbers in a period decimal format.
How is the best way to do this? Have tried readtable, but it think the comma is a seperator and i only get the decimal points.
I have attached a reduced size copy of the .txt file.

Akzeptierte Antwort

Jeremy Hughes
Jeremy Hughes am 4 Mär. 2021
You can try this after R2020a
readtable(filename,'DecimalSeparator',',')
or earlier
opts = detectImportOptions(filename,'DecimalSeparator',',');
readtable(filename,opts)

Weitere Antworten (0)

Kategorien

Mehr zu Cell Arrays finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by