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 件のコメント

Steven Lord
Steven Lord 2020 年 7 月 8 日
Isn't this related to one of your previous questions?
alpedhuez
alpedhuez 2020 年 7 月 8 日
Yes. But I want to understand whether there is a simpler expression.

サインインしてコメントする。

 採用された回答

Sai Sri Pathuri
Sai Sri Pathuri 2020 年 7 月 10 日

0 投票

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Dictionaries についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by