function qqplot1(X)
%function qqplot1(X)
%
% variant of qqplot for 1 variable
%
% X = vector of observations

[n,p]=size(X);
if p>1, X=X(:,1);fprintf('Only first column is processed\n');end

[d,ix]=sort(X);
j=(1:n)';
z=norminv( (j-0.5)/n,mean(X),std(X));
qqplot(z,d);
xlabel('normal distribution');
ylabel('observations');
rho=corrcoef([z,d]);
fprintf('Corr.coeff %f \n', rho(1,2))


