Skip to content

Instantly share code, notes, and snippets.

@jfhbrook
Created February 11, 2010 19:42
Show Gist options
  • Save jfhbrook/301867 to your computer and use it in GitHub Desktop.
Save jfhbrook/301867 to your computer and use it in GitHub Desktop.
An alternate, shorter/vectorized version of subset.m from before. Product of bouncing ideas off Dustin.
function out=subset(in,n)
%subset(row_vector,spacing)
%subsets a row vector
%by Josh Holbrook and Dustin Ray
out=in(floor(linspace(1,size(in,2),n)));
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment