Effacer les filtres
Effacer les filtres

How to: Retime a timetable without omitting NaNs

8 vues (au cours des 30 derniers jours)
Corymbiamaculata
Corymbiamaculata le 15 Oct 2019
Commenté : Peter Perkins le 15 Avr 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 commentaires
KAE
KAE le 8 Avr 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 le 15 Avr 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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Timetables dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by