how to determine the number of positive values every 5 time-steps
Posted: Sun Jun 23, 2019 7:06 am
Hello Everyone
my model consists of a random number generator. it generates positive and negative numbers.
is there a way to find out the number of positive values generated every 5 time-steps?
in other words, I want to specify a variable in my model called "number of positive values" to show me the number of positive values every 5 time steps.
here is an example of what I want to do:
imagine my model has generated the following numbers in 10 consecutive time steps.
-1.02582, -0.780324, 0.168143, 0.287632, 0.569913, -0.981128, 0.544378, 0.472801, -0.370337, -0.387548
"number of positive values" must get the following values:
in the fifth time step : 3
in the sixth time step : 3
in the seventh time step : 4
in the eighth time step : 4
in the ninth time step : 3
in the tenth time step : 2
thanks in advance.
my model consists of a random number generator. it generates positive and negative numbers.
is there a way to find out the number of positive values generated every 5 time-steps?
in other words, I want to specify a variable in my model called "number of positive values" to show me the number of positive values every 5 time steps.
here is an example of what I want to do:
imagine my model has generated the following numbers in 10 consecutive time steps.
-1.02582, -0.780324, 0.168143, 0.287632, 0.569913, -0.981128, 0.544378, 0.472801, -0.370337, -0.387548
"number of positive values" must get the following values:
in the fifth time step : 3
in the sixth time step : 3
in the seventh time step : 4
in the eighth time step : 4
in the ninth time step : 3
in the tenth time step : 2
thanks in advance.