I'm new to Matlab. I'm doing ECG signal analysis. I have ECG data in .mat format and I have used pan_tompkin algorithm to calculate R peaks of the ECG signal, then I have calculated the RR interval from the output index of R peaks, so I get RR_interval vector (1x7831 double). Once all R-peaks were detected, the full RRI signal is obtained. I need to create a sliding window with one heartbeat overlapping width of N=158 samples corresponding to 3 minutes to extract some features from RRI, For example, for each part of the windowed signal 9 features need to be calculated(6 time-domain and 3 frequency domain features). PLEASE HELP, I don't know how to start doing this in Matlab.