multiply col vector with matrix

2 次查看(过去 30 天)
I have matrix and one column vector. I want to multiply column vector with each of column in matrix.
Let say matrix is M and column is N, I want to multiply N with each column of M.

采纳的回答

Junaid
Junaid 2012-4-5
You can do it like this.
bsxfun(@times,M,N)
If N is column vector then each colmn in M is multiplied by N, else if N is row vector then each row in M is multiplied by N.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by