Skip to content

Instantly share code, notes, and snippets.

@jfhbrook
Created February 7, 2010 21:40
Show Gist options
  • Save jfhbrook/297699 to your computer and use it in GitHub Desktop.
Save jfhbrook/297699 to your computer and use it in GitHub Desktop.
function xn = subset(x,n)
%subsets array x to xn with every nth row
%Written by Josh Holbrook and Marcus Curley
%for Thermal Systems Lab
xn = x(:,1);
for i = 1:n:size(x,2)
xn = [xn x(:,i)];
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment