How to Rearrange data?
Mostrar comentarios más antiguos
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.
Respuesta aceptada
Más respuestas (1)
Image Analyst
el 30 de Jun. de 2019
0 votos
Try importdata(), readtable(), or dlmread().
Categorías
Más información sobre Operations on Strings en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!