2010-04-11 45 views

回答

3

或者,使用repmat:

padColor = repmat(bgColor,[1,1,3]) 
1

另一个是:

padColor(:,:,1:3) = bgColor