img_size = 300;
figure('Units','pixels','Position',[10 10 img_size img_size]);

n_wind = 20;
no_wind = size(sequence,2) - n_wind;

for i = 00:no_wind
    sig = sequence((1+i):(n_wind+i));
    offset = mean(sig) - (5 + 10)/2;  % Refer to ylim
    sig = sig - offset;
    t = 1:n_wind;
    
    plot(t,sig)
    xlim([1 110]); ylim([5 10]);
    
    track = i;
    path = 'C:\Users\DELL\Desktop\CNN\SSD methods\Exper5\length20';
    if track < 10
        fig_name = sprintf('%01d',track);
    else
        fig_name = sprintf('%d',track);
    end
    saveas(gcf,fullfile(path,fig_name),'jpeg');
    clf
    
end
    
    