This preview shows page 1. Sign up to view the full content.
Unformatted text preview: % elements and returns the sum as a scalar. If the input is an empty % vector the function should return 0. function out = recursiveSum(in) if isempty(in) out = 0; else out = in(1) + recursiveSum(in(2:end)); end...
View Full Document
This note was uploaded on 10/22/2009 for the course CS 1371 taught by Professor Stallworth during the Fall '08 term at Georgia Institute of Technology.
- Fall '08