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.
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.