Segmenting EMG via a Loop

2 次查看(过去 30 天)
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

采纳的回答

Star Strider
Star Strider 2021-3-20
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 个)

类别

Help CenterFile Exchange 中查找有关 Spectral Measurements 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by