Skip to content

Instantly share code, notes, and snippets.

@rajatsaxena
Created June 17, 2020 10:31
Show Gist options
  • Save rajatsaxena/9515c34183b85c295f2695176cc938c5 to your computer and use it in GitHub Desktop.
Save rajatsaxena/9515c34183b85c295f2695176cc938c5 to your computer and use it in GitHub Desktop.
time splitting matlab
time_dataset = [1 2 3 4 5 6 7 8];
grp_size = 3;
overlap = 2;
% th = length(time_dataset) - overlap;
for i=1:grp_size-overlap:length(time_dataset)
disp(time_dataset(i:i+grp_size-1));
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment