摘要: View Code 1 function result = matrix_change(X,m1,n1)2 %需要变换的矩阵,分割成m1*n1区域求均值3 [m,n] = size(X);4 solution=reshape(sum(reshape(X,m1,[])),[],n);5 solution_z=reshape(sum(reshape(solution',n1,[])),[],m/m1);6 result=solution_z'/(m1*n1);调用:View Code clc;A=[1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 阅读全文
posted @ 2011-09-02 16:49 小妖.OTZ 阅读(610) 评论(0) 推荐(0) 编辑