主题
:
[求助]for优化,结果不对
查看单个帖子
2008-04-03, 19:54
#
8
fgabertb
普通会员
注册日期: 2008-03-25
年龄: 40
帖子: 58
声望力:
19
你是要算方塊化的平均嗎
有內建函數
f=[1 2 3 4;1 2 3 4;1 2 3 4;1 2 3 4];
g=blkproc(f,[2 2],'mean2'):smile:
不用的寫法
A=[1 2 3 4;1 2 3 4;1 2 3 4 ;1 2 3 4] ;
g=reshape(mean([reshape(A(:,1:2:end),2,[]);reshape(A(:,2:2:end),2,[])]),size(A,1)/2,[])
fgabertb
查看公开信息
发送悄悄话给 fgabertb
查找 fgabertb 发表的更多帖子