I have a signal that is 40 seconds long. I need to split it into 5 equal sections of 8 seconds.
I could do this the long way by:
let my signal = sig
then
subsig1 = sig(1:8*Fs)
subsig2 = sig((8*Fs)+1:16*Fs)
subsig3 = sig((16*Fs)+1:24*Fs)
subsig4 = sig((24*Fs)+1:32*Fs)
subsig5 = sig((32*Fs)+1:40*Fs)
However, I want to do this in a loop. Can anyone help?
I could do this the long way by:
let my signal = sig
then
subsig1 = sig(1:8*Fs)
subsig2 = sig((8*Fs)+1:16*Fs)
subsig3 = sig((16*Fs)+1:24*Fs)
subsig4 = sig((24*Fs)+1:32*Fs)
subsig5 = sig((32*Fs)+1:40*Fs)
However, I want to do this in a loop. Can anyone help?