Edit: The code is edited and new result is pasted.
I am trying to generate random numbers using randi command in MATLAB. I am generating 100, 1000 and 100,000 random numbers, respectively, between 50 and 100. Following is my code:
clc
clear all
close all
x = randi([50 100],1,100) % random numbers generated
subplot(221)
hist(x) % ploting these numbers on a histogram
title ('Histogram for 100')
y = randi([50 100],1,1000) % random numbers generated
subplot(222)
hist(y)
title ('Histogram for 1000')
z = randi([50 100],1,100000) % random numbers generated
subplot(223)
hist(z) % ploting these numbers on a histogram
title ('Histogram for 100,000')
But I am getting following result:
Is my code right?

write subplot command before hist
Like so