2010-09-21 139 views

回答

1

如果A是N×M的的矩陣,那麼NxMx3矩陣爲:

B = hypermat([size(A), 3], kron(ones(3, 1), A(1:$)))

B = hypermat([size(A), 3], ones(3, 1).*.A(1:$))