I am doing principle component analysis I have an original real matrix feeding in to a the covarience matrix which gives the mean out at one of the nodes and want to subtract that from each element of the original matrix to form a new matrix. If this is to hard to connect the mean out of the covariance matrix is there a way of just finding the mean of the original matrix and subtracting this from each element in the matrix to form a new matrix.
Thanks for your help
Solved! Go to Solution.
The Subtract primitive on the Numeric palette is polymorphic. You can subtract a scalar from a matrix or an array. The result is also a matrix or an array with the scalar value subtracted from each element.
Thanks for your quick reply. I must have been tired last night I realised that the problem is that I have a 1d matrix comming out of the covariance matrix and I am trying to subtract that from a each element of a 2d matrix, but I don know how to do this. I have attached the code of what I am trying showin the broken wire.
Your help is greatly appreciated.