フィルターのクリア

How to change certain values of a column in a table depending on a certain time range ?

5 ビュー (過去 30 日間)
Hi there,
I have an array Total and then I created a timetable to combine them together.
t1 = datetime(2020,04,01, 0,0,0);
t2 = datetime(2020,04,01, 23,59,59);
Date = [t1:seconds(10):t2]' ;
T = table(Date,Total);
totalaggregated = table2timetable(T) ;
Now I want to replace the value in Total column ONLY for the following time range,
TR = timerange('2020-04-01 14:50:00','2020-04-01 15:10:00');
So that
Total = Total * 0.75
Can any one please help me how to do this ?
Thanks.
Regards,
Gayan

採用された回答

Tommy
Tommy 2020 年 4 月 13 日
Try this:
totalaggregated{TR,{'Total'}} = 0.75*totalaggregated{TR,{'Total'}};

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by