Time Series Partitioning of EMG data

Illustration
Mathieu_noe - 2021-12-08T15:51:44+00:00
Question: Time Series Partitioning of EMG data

I have emg raw data of size 40000*1.I would like to segment the time channel in such a way that each channel consist of 2000 sample and plot it. total time should be divided into 20 channels where each channel consist of 2000 samples.can any one help me  

Expert Answer

Profile picture of John Michell John Michell answered . 2025-11-20

hello
 
see example below :
samples = 40000;
buffer = 2000;

data = rand(samples,1)+10*((1:samples)/samples)'; % noisy ramp signal (dummy data)

for ci = 1:fix(samples/buffer)
    
    start_index = 1+(ci-1)*buffer;
    stop_index = min(start_index+ buffer-1,samples);
    data_buffer = data(start_index:stop_index)
    
    figure(ci)
    plot(data_buffer)
end
    

 


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!