This is my code. Is this correct?
u=[1 1.5 2 2.5 150 20 60 110];
two=randi(100,8);
for nn=1:100
Error(nn,:)= abs(u(1,:)-two(nn,:));
Error4sn0(nn)=abs(Error(nn,:)).^2; % Sqaured Error of Four sources
MSE4sn0(nn) = sum(Error4sn0(nn,:))/8;
end
MSE4sn0=MSE4sn0';
MSE4sn0=sort(MSE4sn0,'descend');
t=1:100;
semilogy(t,smooth(MSE4sn0),'linewidth',2)
xlabel('Runs')
ylabel('MSE')
title('MSE of All ')