Converting TXT File --> Matlab --> Excel

2 ビュー (過去 30 日間)
Frank Lehmann
Frank Lehmann 2020 年 6 月 25 日
コメント済み: Rik 2020 年 6 月 25 日
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 件のコメント
Rik
Rik 2020 年 6 月 25 日
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.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by