唉,说了要你仔细看hist的帮助了,你再仔细理解下红色的部分的意思吧
n = hist(Y) bins the elements in vector Y into 10 equally spaced containers and returns the number of elements in each container as a row vector. If Y is an m-by-p matrix, hist treats the columns of Y as vectors and returns a 10-by-p matrix n. Each column of n contains the results for the corresponding column of Y
hist(pattern_noise(:),x);
hold on;
hist(pattern_noise2(:),x);
h = findobj(gca,'Type','patch');
set(h,'FaceAlpha',0.5)
[ 本帖最后由 ydlcsu 于 2009-3-25 12:38 编辑 ] |