function result = removeNegatives(v)
% removeNegatives   remove all negatives from a vector
%
% consumes: v, a vector
% produces: result, a vector, the same as v except with
%                   all negative value removed
%
% Example:
%   >> myMax([3 5 -2 6 0 -1 2])
%   ans =
%       3 5 6 0 2
%   >> myMax([])
%   ans = 
%       []
%   >> myMax([-2 -1])
%   ans = 
%       []
%
% P. Conrad for CISC106, sect 99, 12/11/2007
  
  result = [];
  for i=1:length(v)
    if (v(i) >= 0) 

      % //** (5 pts) Fill in the missing line of code
      result = [ result v(i) ];  % //* add this element
    end; % if
      
  end; % for

  return;
  
end % function
