Segmenting EMG via a Loop
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ryan Chhiba
am 20 Mär. 2021
Beantwortet: Star Strider
am 20 Mär. 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 Kommentare
Akzeptierte Antwort
Star Strider
am 20 Mär. 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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Spectral Measurements finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!