clear all
close all

ms = 12;
fs = 30;
randn('seed',2)
x = normrnd(0,2, [1 20]);
y = normrnd(2,1, [1 20]);
figure(1)
plot(x, y,'o','markersize',ms,'markerfacecolor','g', 'markeredgecolor','k')
text('Interpreter','latex',...
	'String','$$r = 0.04$$',...
	'Position',[-3.5   3.5],...
	'FontSize',fs)
corr(x',y')
%print -depsc 'C:\Springer\Corr\Correps\corr0.eps'

figure(2)
y1 = 0.3 * x + 0.7 * y;
plot(x, y1,'o','markersize',ms,'markerfacecolor','g', 'markeredgecolor','k')
text('Interpreter','latex',...
	'String','$$r=0.54$$',...
	'Position',[-3.5   3],...
	'FontSize',fs)
corr(x', y1')
%print -depsc 'C:\Springer\Corr\Correps\corr05.eps'

figure(3)
y2 = 3-(0.45 * x - 0.55 * y);
plot(x,  y2,'o','markersize',ms,'markerfacecolor','g', 'markeredgecolor','k')
text('Interpreter','latex',...
	'String','$$r=-0.77$$',...
	'Position',[-3.6   2],...
	'FontSize',fs)
corr(x', y2')
%print -depsc 'C:\Springer\Corr\Correps\corrm08.eps'

figure(4)
y3 = 0.7 * x + 0.3 * y;
plot(x, y3,'o','markersize',ms,'markerfacecolor','g', 'markeredgecolor','k')
text('Interpreter','latex',...
	'String','$$r=0.96$$',...
	'Position',[-3.5   2.1],...
	'FontSize',fs)
corr(x', y3')
%print -depsc 'C:\Springer\Corr\Correps\corr09.eps'

