필터 지우기
필터 지우기

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 CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by