close all;
a = exprnd(4,100,1); %generate a 100x1 vector with samples drawn from an 
                    %exponential distribution with lambda=4
                    
b = exprnd(4,100,1);

figure;
hist(a); %plot the histgram of a
title('Histogram of an exponential distribution');

figure;
qqplot(a,b) %qqplot of a verus b
title('a versus b');

%correct the x and y axis
xlim( [ min([a;b]) max([a;b]) ] );
ylim( [ min([a;b]) max([a;b]) ] );

%plot y=x line
x = min([a;b]) : max([a;b]);
hold on;
plot(x,x,'black');

c = normrnd(0,1,100,1); %generate a 100x1 vector with samples drawn from
                        % the Gaussian distribution N(0,1)
                        
figure;
hist(c);  %histogram of c
title('Histogram of c');

figure;
qqplot(a,c); %qqplot of a versus c
title('a versus c');
hold on;

%correct the x and y axis
xlim( [ min([a;c]) max([a;c]) ] );
ylim( [ min([a;c]) max([a;c]) ] );

%plot y=x line
x = min([a;c]) : max([a;c]);
hold on;
plot(x,x,'black');
