function  sum = mysum_recursive(x)
% input: 
%  n: a vector of numbers
% output:
%  result: sum of the number in the vector x
%

sum = 0;

if (length(x) == 0)
   sum = 0;
elseif (length(x) == 1 )
   sum = x;
else
   sum = x(1, 1) + mysum_recursive(x(1, 2:end));
end
