making matrix with text file information
Afficher commentaires plus anciens
I have following data:
2022-04-1113:38:14.002 0
G4 20
G9 39
G17 41
G20 42
G27 17
G28 41
G32 35
G4 20
G9 39
G17 41
G20 42
G27 17
G28 41
G32 35
2022-04-1113:38:15.000 0
G4 18
G9 42
G17 42
G20 38
G28 42
G30 43
G4 18
G9 42
G17 42
G20 38
G28 42
G30 43
I want to convert it to following:
G4 G9 G17 G20 G27 G28 G32 G30
2022-04-1113:38:14.002 20 39 41 42 17 41 35
2022-04-1113:38:15.000 18 42 42 38 42 43
1) Taking timestamp from rows and makes it row "a new" of matrix
2) in that new row, it looks for next lines until another timestamp found
2a) If no timestamp found, it makes a new colum for each unique values of G* and populates it with the value of signal strength
3) When new timestamp found it appends the matrix
4) The number of G* are not same for each time stamp
5) The value of G* are also vary with timestamp
Do you have any suggestion please?
5 commentaires
Geoff Hayes
le 13 Juin 2022
@Anjali Mishra - is the above data found in a text file? If so, can you attach it to this question?
Anjali Mishra
le 14 Juin 2022
DGM
le 14 Juin 2022
Each data line appears to be duplicated. Is it certain that all duplicate Gxx entries in a given data block also contain duplicate data?
Anjali Mishra
le 14 Juin 2022
DGM
le 14 Juin 2022
Is the output simply to be a cell array, or is it text printed to a file or something?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!