I have the following equation and I am trying to simplify it:
$$\frac{\sum_{i=1}^M \sum_{j=1}^N [f(i,j) - h(i,j)]^2}{\sum_{i=1}^M \sum_{j=1}^N [f(i,j)]^2}=1-\frac{2\sum_{i=1}^M \sum_{j=1}^N f(i,j)h(j,j)+\sum_{i=1}^M \sum_{j=1}^N [h(i,j)]^2}{\sum_{i=1}^M \sum_{j=1}^N [f(i,j)]^2}$$
Is this simplification correct? If not what is the right answer?