Unformatted text preview: % the sum of that vector using recursion. % % Notes: % -You *must* use recursion to solve this problem. % function ans = recurSum(vec) if length(vec) == 0 ans = 0 else ans = vec(1) + recurSum(vec(2:end)) end...
View Full Document
This note was uploaded on 07/06/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Tech.
- Fall '08