如何在数组上应用滑动窗口?

时间:2019-11-06 19:27:28

标签: arrays matlab matrix image-segmentation sliding-window

如何在窗口大小为23x768的矩阵23x1843200上应用滑动窗口? data

%% input
 data matrix
DDD=load('data.mat');
data=DDD.data;
N_max=length(data);
window_size=256*3; %% 256 for 1 second ==> 3 seconds
step_win=128*3; %% overlapping window ...by 50%
count=0;
for n_start = 1:step_win:(N_max-window_size)
    count=count+1;
    segment=data(n_start:(n_start+ window_size-1));
   end
plot(segment)
xlabel('time')
grid on;
title('last segment of channel1');

0 个答案:

没有答案