Skip to content

Instantly share code, notes, and snippets.

@chappjc
Created March 17, 2015 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chappjc/b92dc0ffdd2366341c4b to your computer and use it in GitHub Desktop.
Save chappjc/b92dc0ffdd2366341c4b to your computer and use it in GitHub Desktop.
function d = naive_jit_test(vals,runlens)
% basic loop approach to run length decoding
% (http://stackoverflow.com/a/29084077/2778484)
d(sum(runlens))=0;
jj=1;
for ii=1:numel(vals),
d(jj:jj+runlens(ii)-1) = vals(ii);
jj = jj + runlens(ii);
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment