How to: Retime a timetable without omitting NaNs

3 visualizaciones (últimos 30 días)
Corymbiamaculata
Corymbiamaculata el 15 de Oct. de 2019
Comentada: Peter Perkins el 15 de Abr. de 2020
Hi,
I'm trying to use the retime function on a 488 x 12 x 4 timetable, and calculate monthly sums from 488 daily values. The problem is, there are lots of missing values (NaNs) in my dataset, and since retime's 'sum' method omits NaNs, in months with lots of missing data, I receive falsly low sums. I tried using @sum, but I'm getting an error:
Unable to concatenate incompatible values returned by the function 'sum' when applied to groups in the variable 'Var1':
Dimensions of arrays being concatenated are not consistent.
Any help will be appreciated!
  3 comentarios
KAE
KAE el 8 de Abr. de 2020
I am getting this error too, perhaps due to irregularly sampled data so I don't have data in every bin. This is the only mention of the error I've found on the web. If you have figured it out, please post.
Peter Perkins
Peter Perkins el 15 de Abr. de 2020
KAE, if you are using @sum, the problem is that the sum function returns an empty for empty input, and that can't be concatenated with the scalar value coming from the non-empty bins. That's why retime has it's own local version of sum, which you get by passing 'sum', not @sum. If you are doing something else, you need to give a short example of your data and what command you are using.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Timetables en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by