How to truncate a time series to 20.000 points?

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 commentaires

KSSV
KSSV le 22 Mai 2017
It is 20 points or value of 20?
dpb
dpb le 22 Mai 2017
I'm guessing it's 20,000 points; the dot is thousands punctuation not decimal position.
Hi everyone,
I am sorry for the confusion1
I meant 20 thousands.
Kind regards,
Massilon

Connectez-vous pour commenter.

 Réponse acceptée

dpb
dpb le 22 Mai 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.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by