I'm trying to write the following using sensible notation:
In the time period between now and M units ago, if n > 0 output 1, if n = 0 output 0. Where n is the number of events that have occurred in the time period.
I think I can write that as:
\begin{equation} \label{eqn:algdef} \mbox{for }[t-M,t]\mbox{ } B = \left\{ \begin{array}{lll} 1 & for & n > 0\\ 0 & for & n = 0 \end{array} \right. \end{equation}
However, I'm an engineer, not a mathematician and I want to check that that this notation makes sense.
If it doesn't what's the better way to do this?