[求助]不同维数矩阵相加如何处理
如题,例如:F=repmat(1,[2 2 3]),R=[1 2;3 4],F和R如何相加?请高人指点,谢谢
>> F=repmat(1,[2 2 3]) F(:,:,1) = 1 1 1 1 F(:,:,2) = 1 1 1 1 F(:,:,3) = 1 1 1 1 >> R=[1 2;3 4] R = 1 2 3 4 >> G=F+repmat(R,[1,1,3]) G(:,:,1) = 2 3 4 5 G(:,:,2) = 2 3 4 5 G(:,:,3) = 2 3 4 5