How to Rearrange data?
Show older comments
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.
Accepted Answer
More Answers (1)
Image Analyst
on 30 Jun 2019
0 votes
Try importdata(), readtable(), or dlmread().
Categories
Find more on Operations on Strings in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!