Question: How to generate a vector by calculating the entries of another vector with a constant?

Hi,

I am a newbie and therefore have a rather simple question for the community:

By reading in my measurement data (topographic data) I have generated column vectors:
for i from 1 to k do
    B[i] := Vector(A[1 .. k, i]);
end do:
where k is a predefined rank of the original square matrix. The arithmetic mean was then calculated for each individual column vector:
for i from 1 to k do
    Am[i] := add(B[i][n], n = 1 .. k)/k;
end do:

Now I try to create new column vectors by subtracting the corresponding mean value from each entry of the original vectors, something like that:
for i from 1 to k do
C[i]:=B[i][n]-Am[i],n=1..k

But I just can't get it right. Can anyone help me? Thanks in advance!

Cheers
Christian

Please Wait...