필터 지우기
필터 지우기

Average C/No value for each second

조회 수: 2 (최근 30일)
Simona Blaskova
Simona Blaskova 2023년 9월 12일
댓글: Star Strider 2023년 9월 16일
I have a 19790x2 table containing data with C/No values with timestaps. Timestamps are duplicate, there are multiple rows for each second, as shown in the picture below.
I need to get a vector 'average_CNo_gps', which would contain an average C/No value for each second. The time vector, which contains the total number of seconds is 1814x1 (so the result should be 1814x1 as well). However, my code gives me a 1638x1 vector as a result instead and I don't know why. My code is as follows:
G = findgroups(gps_L1.UTCTime);
avg_CNo_gps_L1 = splitapply(@(x) mean(x), gps_L1.Cn0DbHz, G);
I also tried discretize function for the time, but with the same result.
Could anyone help me with this and tell me where I make a mistake or is there any other way to approach this? Any help would be highly appreciated!
  댓글 수: 1
Dyuman Joshi
Dyuman Joshi 2023년 9월 12일
Please attach your data, use the paperclip button to do so.

댓글을 달려면 로그인하십시오.

채택된 답변

Star Strider
Star Strider 2023년 9월 12일
It would help to have the data.
The best approach will likely be to create a timetable from it and then use the retime function.
  댓글 수: 2
Simona Blaskova
Simona Blaskova 2023년 9월 16일
Unfortunately I couldn't upload the file, the size was too big. However, I tried using the retime function as you suggested and now it works just fine! So thank you very much!
Star Strider
Star Strider 2023년 9월 16일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by