function y=addnoise(x,nnodes,sigma)
% adds gaussian noise to a vector x
for n=1:nnodes
   y(n)=x(n) + randn*sigma;
end
plot(y,'*')
