How to truncate a time series to 20.000 points?
6 views (last 30 days)
Show older comments
Massilon Toniolo da Silva
on 22 May 2017
Commented: Massilon Toniolo da Silva
on 22 May 2017
Dear colleagues,
I am using ann2rr() to generate RR time series from beat annotation files from Physionet.org. I would like to truncate ALL obtainned time series up to a value say of 20.000 points. How could I implement it for various time series? Can it be done simultaneously for many times series? If yes, how? I have never worked with time before and therefore I would need a very understable explanation, if possible! Many thanks for your patience and guidance. Kind regards, Massilon
3 Comments
dpb
on 22 May 2017
I'm guessing it's 20,000 points; the dot is thousands punctuation not decimal position.
Accepted Answer
dpb
on 22 May 2017
Don't know how you're getting the data, but if it is just a chosen length in number of elements (points), then simply
data=importdata(...); % just example way to load a data file
NKeep=20000; % the size of series wanted
data=data(1:NKeep,:); % keep that many rows; all columns
Incorporate such logic in a function that does the reading of the data given the filename(s) and desired length to make it a general facility.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!