function error = meanSquareError(y, y_est) % Function calculates the mean sqauare error between observed and predicted values. % % Agruments: y, the observed values % y_est, the predicted values. % % Returns: the error in the mean-square-deviation sense. error = mean((y - y_est).^2);