"The length of the segments cannot be greater than the length of the input signal" - pwelch
Afficher commentaires plus anciens
Hello, I am trying to use pwelch to estimate PSD for an EEG dataset sampled at 250Hz with trials lasting 4s, i.e., 1000 datapoints per trial.
[psds, f] = pwelch(eeg_ArrowL(chnl,trial,:), [], [], [], 250);
This is the general statement I adapted from a script from another project, where eeg_ArrowL(chnl,trial,:) = 1x1x1000 double. However, I keep getting the error "The length of the segments cannot be greater than the length of the input signal.", as specified in the title of this post. It does work when I make the signal input a length of 2000, so I am assuming the arguements for window and noverlap are wrong for a signal input of length 1000. I have tried to read up more on how pwelch works and what the arguements do, and I have tried different values for window and noverlap but it still does not work. Please help.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Parametric Spectral Estimation dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
