Plot 2 histograms on the same figure with aligned bins.
% generate some random data
A = normrnd(3,1, [15, 1]);
B = normrnd(3.9, 0.2, [15, 1]);
plotMutlipleHists(A, B)
Plot 5 histograms on the same figure with aligned bins.
% generate some random data
A = normrnd(3,1, [15, 1]);
B = normrnd(3.9, 0.2, [15, 1]);
C = normrnd(3.5, 0.3, [15, 1]);
D = normrnd(1, 0.2, [15, 1]);
E = normrnd(5, 0.1, [15, 1]);
plotMutlipleHists(A, B, C, D, E)
Data vectors.
Vectors of data to be plotted as histograms.
This is all this function does (a good function does 1 thing and 1 thing only). You can get the figure and axis after and edit the properties. It does default to a figure font size of 16 so I can see it.