clc close num=46000; step=23000; n=num/step; arr=randn(num,1) * 8.239027791394347 + 70; std(arr) mean(arr) arr_s=sort(arr); s=zeros(step,n); std_arr=zeros(step,1); mean_arr=zeros(step,1); for i=1:n a=(i-1)*step +1; b=i*step; s(:,i)=arr_s(a:b); std_arr(i)=std(s(:,i)); mean_arr(i)=mean(s(:,i)); end grid on subplot(2,1,1) plot(mean_arr) subplot(2,1,2) plot(std_arr)View Code
标签:std,正太,arr,方差,step,num,标准差,zeros,mean From: https://www.cnblogs.com/wdfrog/p/17297922.html