function rmses = rmse(xx)
% xx     = TxN matrix of forecast errors for N horizons
% rmses  = 1xN vector of rmses

[T,N]=size(xx);

rmses = (sum(xx.^2)/T).^.5;

if size(rmses,1)==N;
    rmses=rmses';
end