Extract row from time series table based on independent variable

10 views (last 30 days)
I have a time series table with a time on the left and data on the right. Let's call it channel_0. channel_0.time increments by 0.01 starting from 0. I need to access the data that lies in the boundary: 133.01 < channel0.data < 133.03 (the boundary is dynamic, so I have a variable that decided its value). How can I extract the row(s) that satsify this condition?

Answers (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 4 Aug 2021
% Use Logical Indexing:
IDX = (channel0.data>133.01 & channel0.data<133.03);
DATA_OK=DATA(IDX,:); % Assumed the data variable name is: DATA

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!