用matlab统计矩阵里每个数字周围24个格里的各个数频数怎么做

2025-03-14 00:46:28
推荐回答(1个)
回答1:

y=x(i-2:i+2,j-2:j+2);
y=reshape(y,1,25);
y=y(1:12,14:25);
[c,d]=hist(y);