嗨
,我有一个 MATLAB 程序,我在其中绘制了几个直方图。每次重新缩放 hist (轴)。我希望所有的历史都以相同的比例显示。
这是程序:
clc
close all
PopSize=10^3;
SampleSize=1:100:PopSize;
NumberOfSamples=10^2;
Pop=randn(PopSize);
figure(NumberOfSamples+1);
hist(Pop);
sample=[];
for j=1:100:PopSize
for i=1:1:NumberOfSamples
Pop=SHUFFLE(Pop);
sample(i)=mean(Pop(1:j));
end
figure(i+j);
hist(sample);
end