How to split a signal with same window size but with overlapping windows.

I have an ecg type signal, I just have to apply my model on fixed length widows size. For that I have to divided my signal into sub signals of equal length.
Supoose if my window size = 100sec, at first, I will apply my model on 100 sec signal after that instead of start from 101 seconds, I want start the next subsignal from 51 seconds to get overlapping windows. Data file is attached.
Your help will be highly appreciated.
Thanks.

Answers (1)

You can use the function buffer to create a signal matrix with overlapping windows from a signal vector.
y = buffer(x,n,p) will split the signal x into segments of length n samples with p samples overlap

Categories

Asked:

on 4 May 2019

Answered:

on 20 May 2019

Community Treasure Hunt

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

Start Hunting!