MATLAB: Retime: apply different method for different columns

MATLAB

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?

Best Answer

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))];
Related Question