function [v,d,z]=eof(u)
%EOF  empirical orthogonal functions 
% [v,d,z]=eof(u)
% time series components stored as column vectors in u.
% v is the matrix of eigenvectors
% d is a diagonal matrix of eigenvalues
% z is the time series of mode amplitudes, stored as column vectors
%
[v,d]=eig(cov(u));
z=u*v;
