Showing processes as an Equation I have developed an algorithm that counts the number of times a particular block (within a 2D block) crosses zero. Here's an example:

B1 = {  1, 4, 
        -1, -3, 
        0.12, -2.3
     }


The answer would there for be 3. To do this, what I do is:


Find the signum value of each element within the block (will return "1", "-1", "0") respectively.
If the signum value returns -1 then count increments by 1. 


This will repeat until the there is no blocks, however, will only produce 1 value per block.

I am looking for a way to put all this process into an equation so I can demonstrate this rather than having to explain the processes in written text everytime. Is this possible?
Your algorithm, as described, is not correct.  You are simply counting the number of negative numbers, not the number of zero crossings.  For the particular data set that you use, B1, the two numbers are the same, but in general they won't be.

The way to do it is to multiply each number by the number after it, and if that number is negative, then you have a zero crossing.

zeroCrossings = sum((data(1:end-1) .* data(2:end)) &lt; 0);


You also need to add some logic to handle samples that are exactly zero, but hopefully you get the idea at this point.