Previous problems in this series
Step 2: Covariance
For the second step we want the covariance matrix of the centred and standardized data that we calculated in Step 1. We could conveniently use Matlab's cov function, but this repeats much of what we've already done, for instance centering by removing the mean. It also has to deal with a wider range of possible inputs, whereas we have a very well specified starting point.
Task
Build on the code produced for Step 1 by writing a function to calculate the covariance matrix of the centred and standardized data matrix.
Add the following field to those already produced by your zscore function.
Tips
Where are the other steps Neil ?
Now what was so hard about that? :-)
Next I need to work on this pernicious 'ans' rubbish.
HAHAHA I had some fun here, sorry about that... ;-)
but also I forgot the minus one. :-/ So the test-case was wrong. Now I found my mistake.
:-P
I had the same idea, but I was occupied by bypassing the covariance function :-D
986 Solvers
Find last non-zero in a given dimension
26 Solvers
Back to basics 2 - Function Path
139 Solvers
441 Solvers
535 Solvers