MATLAB: How to adjust the histogram to show approx. 50 different categorized bins with very small data

export iterationshistogramsmall data

I am trying to produce a histogram that shows bins like this one:
Here is my script:
——————-
iter=10000;
FS=40;
for n=1:iter
Sy=2.11*10^8+(60*rand(1));
w=0.0077629+(0.0004*rand(1));
F=30.4+(2*rand(1));
t=(FS*F)/(Sy*w)
end
histogram(t,1000)
———–
The iterations are displayed just fine and are all between 0.0007 and 0.0008 as expected for 't'. When the histogram is displayed there is just one solid block with a bin range from 0 to 0.5 and a y-value of 1.

Best Answer

You need to subscript ‘t’ to save it as a vector.
Try this:
iter=10000;
FS=40;
for n=1:iter
Sy=2.11*10^8+(60*rand(1));
w=0.0077629+(0.0004*rand(1));
F=30.4+(2*rand(1));
t(n)=(FS*F)/(Sy*w);
end
histogram(t,1000)