function result = sumOfPositiveElements(vec)
%productOfOddElements return the sum of all the positive elements
%
% Consumes: vec, a vector of numbers
% Produces: a scalar number
%
% Example:
%
%   >> sumOfPositiveElements([3 -2.5 6 -1])
%  ans =
%        9
%   >> sumOfPositiveElements([])
%  ans =
%        0
%   >> sumOfPositiveElements([-2 -4])
%   ans =
%        0

  result = 0; 
  
  % //**  What should the next line of code be?
  
  for k = 1:length(vec) //*
    if (vec(k) > 0)      
	  result = result + vec(k);
    end
  end

  return
end




