How to trim time series?
77 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Chris
le 2 Oct 2021
Modifié(e) : Ravi Narasimhan
le 2 Oct 2021
X = rand(1,128)-0.5;
fs = 1000;
Ts = 1/fs;
Y = lowpass(X,100,fs);
plot(Y);
Z = conv(X,Y);
THE length of Z is 255
I want to trim the ends off Z so that it has a length of 128.
What do I have to do?
0 commentaires
Réponse acceptée
Ravi Narasimhan
le 2 Oct 2021
Modifié(e) : Ravi Narasimhan
le 2 Oct 2021
Are you trying to discard elements 129 through 255?
If so,
Z(129:end) = []; % Discard the unwanted elements
or
Z=Z(1:128); % Keep the desired elements
should do it.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Time Series dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!