How to read and arrange certain data in multiple text file?
조회 수: 4(최근 30일)
표시 이전 댓글
Hi,
I need to arrange the data after post-proceesing in text file and need to arrange the data in certain order. I only need the numerical part of the data. Any suggestion to solve this problem?
Attached herewith 3 text file of the data.
댓글 수: 0
채택된 답변
Bhaskar R
2020년 3월 11일
FAM_data = readmatrix('FAM.txt');
FCC_data = readmatrix('FCC.txt');
FM2_data = readmatrix('FM2.txt');
추가 답변(1개)
Peter O
2020년 3월 11일
편집: Peter O
2020년 3월 11일
This seems like a good opportunity to leverage MATLAB's table datatype:
Use readtable() to import your data and writetable() to spit it out in the correct column ordering (adding/removing columns as needed. Within writetable, if you specify the name-value pair "WriteVariableNames" and false, the output file will not contain the headers.
참고 항목
범주
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!