%sumOfArray(vector<number>, number) -> number
%Author: James Atlas CISC106 8am
%Description:
%  Takes a vector of numbers and computes the sum.
%Examples:
%  sumOfArray([1 2 3 4], 1) -> 10
%  sumOfArray([-5 5 0 1], 1) -> 1
%  sumOfArray([1.1 2.2 3.3 4.4 5.5], 1) -> 16.5
function out=sumOfArray(numVector, index)
  if (index > length(numVector))
      out=0;
  else
      out = numVector(index) + sumOfArray(numVector, index+1);
  end