I have made a system where I count every hour that meets a certain condition. I would now like to express this in a simple formula but sadly can not come up with a solution. This is what I need.
For each hour where $\theta_{dp} > \theta_{crit}$ add one to DPH. Do this for all hours of the year.
The best I could think of is something like this:
$DPH = \sum^{365}_{j=1} \sum^{24}_{i=1} \left(0 \cdot (\theta_{dp} - \theta_{crit})^{+} \right)!$
This is of cause quite wrong. With the $^{+}$ I try to indicate that the result should only be taken into account if the result of the bracket is positive. Else there is nothing to do. Multiplying any positive result by zero and then take the factorial. I have just included the example to show that I have been pondering the idea for some time but did not get anywhere.
Thanks for any help!
Trying to use the Heaviside function suggested by @Clement C
\begin{equation} DPH = \sum^{365}_{j=1} \sum^{24}_{i=1} \begin{cases} 1 & \mbox{if } \theta^{dp}_{j,i} > \theta^{crit}\\ 0 & \mbox{if } \theta^{dp}_{j,i} \le \theta^{crit} \end{cases} \end{equation}
For some reason this looks incomplete to me. But than i am really not good at this.