How to select multiple ranges of plot data to a cell array
2 views (last 30 days)
Show older comments
Hi, I have a data.xls file (see attachment). I use readtable to import the .xls file and I end up with a 21345x3 table. Here is the code that I use to import the data:
% Transfer all excel data to a table
filename = 'data.xls'; dataTable = readtable(filename);
figure;
plot(dataTable.Time_ms_,dataTable.dataAvgLeft);
hold on;
plot(dataTable.Time_ms_,dataTable.dataAvgRight,'r');
What I would like to do is take the red timeseries in the plot and focus on specific ranges of data. So for example, if you take a look at the figure below, I've circled the multiple ranges of interest in the plot. If I know that the majoriy of my red timeseries waveforms (from future data.xls files) will look like this, can I automate the selection process of these specific ranges so that I can transfer the data points in that range to a separate cell array for further processing?
Thank you for your time and feeback!
0 Comments
Accepted Answer
Jos (10584)
on 24 Sep 2014
Edited: Jos (10584)
on 24 Sep 2014
Can you precisely formulate why you select those parts of the plot?
More Answers (0)
See Also
Categories
Find more on Variables 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!