Filter löschen
Filter löschen

Converting TXT File --> Matlab --> Excel

2 Ansichten (letzte 30 Tage)
Frank Lehmann
Frank Lehmann am 25 Jun. 2020
Kommentiert: Rik am 25 Jun. 2020
I have the attached TXT output report file from Digsilent where i want to convert it to a Malab file then pass it onto an Excel file, any ideas on how i can do this?Unfortunately i havent really done too much with file(s) conversions from importing or exporting of the different extension types and from i see is i can start from here.
Any help much appreciated.
fid = fopen('test.txt', 'rt');
data = cell2mat( textscan(fid, '%s%s%f%f', '\t', 'HeaderLines', 1) );
fclose(fid)
The output is basically empty double matrices but no errors?
Any ideas on how to produce the matlab and excel formats?
Regards,
Frank
  1 Kommentar
Rik
Rik am 25 Jun. 2020
How would you like to store this in excel? I think that is the most important question. If you are using Matlab as a tool to convert it to excel, you should keep that goal in mind.
If you want to read your file line by line, you could consider readfile and then parse every line separately.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by