Skip to content

Instantly share code, notes, and snippets.

@stevester94
Created October 15, 2015 22:53
Show Gist options
  • Select an option

  • Save stevester94/a4ea06116262480d19ac to your computer and use it in GitHub Desktop.

Select an option

Save stevester94/a4ea06116262480d19ac to your computer and use it in GitHub Desktop.
recursive matrix test matlab version
function total = rectest(n, constant, divisibleBy)
if(n <= divisibleBy)
total = constant;
else
total = recTest(n/4, constant, divisibleBy);
total = total + recTest(n/4, constant, divisibleBy);
total = total + recTest(n/4, constant, divisibleBy);
total = total + recTest(n/4, constant, divisibleBy);
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment