maxPositiveStreak#

swordfish.function.maxPositiveStreak()#

If X is a vector: return the maximum value of of the sum of consecutive positive elements of X.

If X is a matrix, return the maximum value of of the sum of consecutive positive elements in each column of X.

maxPositiveStreak(X) = max(cumPositiveStreak(X))

Parameters:

X (Constant) – A scalar/vector/matrix. The elements of X must be logic or integer values.