making matrix with text file information
이전 댓글 표시
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
Geoff Hayes
2022년 6월 13일
@Anjali Mishra - is the above data found in a text file? If so, can you attach it to this question?
Anjali Mishra
2022년 6월 14일
DGM
2022년 6월 14일
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
2022년 6월 14일
DGM
2022년 6월 14일
Is the output simply to be a cell array, or is it text printed to a file or something?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Numeric Types에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!