I am looking for some help with a fast loop to form a bunch of values. Given a 30-vector, x and another 30-vector which is the expected value of such data expx. I want to be able to quickly sum 30*30=90 values to form a symmetric 30x30 matrix. Here is how the (k,l)-entry of my 30x30 matrix is:
so x forms the entries on the left part of the bracket, x_i and expx is the right part, i.e. < x_i > for i=1,2,...,30. You don't need to worry about what values makes up these vectors, I've already determined them. Does anyone know how I should form such elements of the matrix and put them into my 30x30 matrix.
I guess I'd start off with:
M=30;
C = zeros(M);
I'm struggling to get the summation though.
e(t) = x(t) - expx(t)
– Ben Voigt