% compute RMS on validation data for GLARS estimates
% Theta is a matrix: the k-th column contains estimates for the k-th step

function RMSindex=Val_GLARS(yval,Xval,Theta);
n = length(yval);
[nx nt]=size(Theta);


E=kron(yval,ones(1,nt))-Xval*Theta;
RMSindex=diag(E'*E)/n;
