How to Rearrange data?
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 30 Juin 2019
0 votes
Try importdata(), readtable(), or dlmread().
Catégories
En savoir plus sur Operations on Strings dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!