Histogram Not Plotting Correctly
3 views (last 30 days)
Hi, I'm trying to create a histogram for 100 random integers. Only problem is that the plot only shows one value - the last number. My 'for loop' is creating 100 integers, it's just not plotting. Thank you in advance, I'm trying to learn MATLAB by myself for next semester so sorry for asking here.
n = 100;
for k = 1:n
x = randi(5)