function y = custor(x)
%CUSTOR Customized OR functions for CUSTTIP.FIS.
%   This function is really just PROBOR in disguise.

% Copyright 1994 - 2018 The MathWorks, Inc.

% Bounded sum: S(a,b) = min(a+b,1)
maxVal = ones(1,size(x,2),'like',x);
y = zeros(1,size(x,2),'like',x);

for i = 1:size(x,1)
    y = min(maxVal,sum([y;x(i,:)]));
end
end