How to Rearrange data?
이전 댓글 표시
I have input .txt file like :
Number Time Symbol
1 0 C
2 0 E
3 0 D
4 0 C
5 0 D
1 1 C
2 1 C
3 1 C
4 1 D
5 1 E
1 2 C
2 2 D
3 2 D
4 2 C
5 2 E
Where "Number"(1-5) was periodic with "Time"(0-2) and I need to calculate count of each "Symbol" with "Time" and I want to output file as .txt like:
Time C D E TOTAL(C+D+E)
0 2 2 1 5
1 3 1 1 5
2 2 2 1 5
Is there a way to get the output file by using MATLAB?
Thanks.
채택된 답변
추가 답변 (1개)
Image Analyst
2019년 6월 30일
0 개 추천
Try importdata(), readtable(), or dlmread().
카테고리
도움말 센터 및 File Exchange에서 Operations on Strings에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!