array of two dimensions
<p>I want to calculate the difference between the elements of 2 matrix:
example: </p>

<pre><code>s1 = tuple[0][0]-vector[0][0]+tuple[0][1]-vector[0][1]
s2 = tuple[0][0]-vector[1][0]+tuple[0][1]-vector[1][1]
s3 = tuple[0][0]-vector[2][0]+tuple[0][1]-vector[2][1]

static double Distance1(double[][] tuple, double[][] vector)
{
    double sumSquaredDiffs =0.0;
    int i;
    int j;
         for(i=0; i&lt;tuple.length;i++)
            for(j=0; j&lt;vector.length; j++){
             sumSquaredDiffs = tuple[i][0] - vector[j][0]+ tuple[i][1] - vector[j][1];}
            return sumSquaredDiffs;
            }
</code></pre>

<p>I want the result to look like this:</p>

<pre><code>13.0
125.0
123.0
10.0
122.0
120.0
</code></pre>

<p>Can someone please help me correct this function? </p>
