from txt to dat file
Ältere Kommentare anzeigen
I have an program from an older version that uses a dat file looking like :

when I open it using import data.
I want to use data from another station and downloaded the data (attached) (there are no fieldnames)
I wat tot import the data using import data to convert it tot the same output as the original file.
the text file gives the data as:
1996.0417; 6701; 0;000
1996.1250; 6773; 0;000
1996.2083; 6684; 0;000
1996.2917; 6760; 0;000
1996.3750; 6849; 0;000
1996.4583; 6861; 0;000
I know how to split the third column and change both new one tot number but when i change de delimiter to space this happens

I dont know how to proceed from here. And I cannot find a tutorial how to proceed. Can someont tell me which settings i need (table array etc) and how to save the file as a *.dat file
Kind regards, Ellen
4 Kommentare
VBBV
am 13 Feb. 2024
For saving the file see this link https://in.mathworks.com/help/matlab/ref/save.html
Ellen
am 13 Feb. 2024
VBBV
am 13 Feb. 2024
Yes. Matlab can read those file extensions. In your case it's recommended to save it as .txt file which you can later renamed it as .dat file
Dyuman Joshi
am 17 Feb. 2024
Akzeptierte Antwort
Weitere Antworten (1)
Select the desired range in Range field box. i.e. Only the categorical column. It seems you have selected a array of columns in range
1 Kommentar
VBBV
am 13 Feb. 2024
Range: C1:C324
Then apply the space delimiter
Kategorien
Mehr zu Cell Arrays finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!