x=rand(100,1);
y=rand(100,1);
figure(1)
plot(x,y,'.')
corrcoef(x,y)

X=sort(x);
Y=sort(y);
figure(2)
plot(X,Y,'.')
corrcoef(X,Y)

figure(3)
plot(X,sin(2*pi*X/3),'.')
corrcoef(X,sin(2*pi*X/3))