Segmenting EMG via a Loop
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Ryan Chhiba
il 20 Mar 2021
Risposto: Star Strider
il 20 Mar 2021
I have been using this for loop code to window time data into 20 second segments. I Have been trying to use te same code to segment EMG data into 20 second segments but it does not run. There is no error that pops up, it just does not work. Would anyone have some insight to where I am going wrong? Thanks
Fs= 2048
length_time = length(Processed_EMG.EMG_Processed.Conditioned_EMG.notch_480_DDE_SCM_L);
segment= 20;
n= Fs*segment;
int= floor(length_time/n);
for i= 1:int
win_time_begin(i) = n*(i-1);
win_time_end(i) = n*(i);
win(i,:) = win_time_begin(i):1:win_time_end(i);
end
0 Commenti
Risposta accettata
Star Strider
il 20 Mar 2021
If the value of ‘int’ is less than 1, the loop counter is satisfied at the outset, and the loop never iterates.
The Signal Processing Toolbox buffer function is what I always use to segment signals. It is just easier than writing my own code.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spectral Measurements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!