function out=Rosen(X)

% for the Rosenbrock algorithm. Use Covariance updating matrix 
% use truncated normally distributed random number generator
%start off with a trucated normal sampling and update the truncating at each step
% speed up the maxcut algorithm
%use different number of elite samples to compute the mean adn the covariance of the sample

r=[];
for i=1:size(X,2)-1
r=[100*(X(:,i+1)-X(:,i).^2).^2+(X(:,i)-1).^2,r];
end

out=sum(r,2);
