Clear Filters
Clear Filters

How to truncate a time series to 20.000 points?

6 views (last 30 days)
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
dpb on 22 May 2017
I'm guessing it's 20,000 points; the dot is thousands punctuation not decimal position.
Massilon Toniolo da Silva
Massilon Toniolo da Silva on 22 May 2017
Hi everyone,
I am sorry for the confusion1
I meant 20 thousands.
Kind regards,
Massilon

Sign in to comment.

Accepted Answer

dpb
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.

More Answers (0)

Categories

Find more on MATLAB 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!