Extracting time valued between lower and upper bound
古いコメントを表示
Hi Everyone,
I am trying to extract all the rows corresponding to lower and upper bound times. I have a big table (28125x31) and minimum and maximum times in table are 06:13:19 AM and 06:26:37 AM, respectively. I want to get data between t_min and t_max, whereas t_min = 06:16:44 AM and t_max = 06:17:05 AM. I am using following code
row = a([isbetween(a.time(:),t_min,t_max)],:);
where, a is table (28125x31), a.time is vector containing times as shown in attached excel sheet, t_min & t_max are described previously. While this bit of code, I am getting row table as 21871x31. When I check min and max time in row.time, they are 06:16:45 AM and 06:26:37 AM. The upper bound in row.time should be equal to 06:17:05 AM, but somehow code is giving me this value, which leads to inapporporaite size of table.
I have attached a .mat file (Data), containing a table file, which is named as "a".
Any help in figuring out the issue and how to get around it would be highly appreciated. Thank you.
1 件のコメント
dpb
2022 年 9 月 13 日
You forgot to show us the code definitions for t_min, t_max...
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!