retime: apply different method for different columns

5 vues (au cours des 30 derniers jours)
alpedhuez
alpedhuez le 7 Juil 2020
I have a timetable with column 2 temperature and column 3 rainfall. I want to apply mean for column 2 and variance for column 3. Can one this be done with one retime function application?
  2 commentaires
Steven Lord
Steven Lord le 8 Juil 2020
Isn't this related to one of your previous questions?
alpedhuez
alpedhuez le 8 Juil 2020
Yes. But I want to understand whether there is a simpler expression.

Connectez-vous pour commenter.

Réponse acceptée

Sai Sri Pathuri
Sai Sri Pathuri le 10 Juil 2020
It is not currently possible to apply different methods for different columns using a single retime function. You may try this:
outputTable = [retime(inputTable(:,2),'hourly','mean'), retime(inputTable(:,3),'hourly', @(x) var(x))];

Plus de réponses (0)

Catégories

En savoir plus sur Timetables dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by