Subscribe into tall Timetable

14 ビュー (過去 30 日間)
Lutetium
Lutetium 2021 年 9 月 20 日
編集済み: Walter Roberson 2021 年 9 月 20 日
Looking for some way to code this more efficiently:
Description:
I have a large timetable and have identified 'Start' and 'End' Times. 74 Timeranges in total.
array = length(Start); %get the size of the array for pre-allocation
x{1,array} = {};
for i=1:length(Start)
S=timerange(Start(i),End(i),"closed");
temp=gather(TT(S,[6 7])); %gathering the information in every loop iteration is extremely time consuming
x{i}=temp;
end
as mentioned above, the gathering of timerange in every loop iteration is time-consuming. It would probably be better to make a list of multiple timeranges and subcribe them in one go from the tall timetable. I tried a few things but couldnt figure out how to do that.
Can someone guide me in the right direction?
I tried to put the timeranges into an array and tried to subscribe them like that:
temp=gather(TT(S{1,:},[6 7]);
this doesnt seem to be supported. However,
temp=gather(TT(S{1,1},[6 7])
seemed to work. Can someone help out here? Its highly appreciated

回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by