I was hoping that someone could tell me how I can subtract the mean (already coded) from each value in the array, and then sum all these values?
Even if you can only help me with the first part, I would really appreciate it. Thanks! =)
Even if you can only help me with the first part, I would really appreciate it. Thanks! =)
-
if your array is in x, then to subtract a scalar value c from every value in the array you can
1) x - c
2) x - c * ones(length(x))
(1) is the preferred method.
To compute the mean of the subsequent array, there is a function that will compute that. naively, if it is called MEAN, then
s = MEAN(x-c)
will get what you want.
The help function will tell you which function you want. I don't recall the name of the function, but I do remember that it returns an array containing the mean and variance.
1) x - c
2) x - c * ones(length(x))
(1) is the preferred method.
To compute the mean of the subsequent array, there is a function that will compute that. naively, if it is called MEAN, then
s = MEAN(x-c)
will get what you want.
The help function will tell you which function you want. I don't recall the name of the function, but I do remember that it returns an array containing the mean and variance.