MATLAB: Matrix and vector

kron

Hi How should be written a code to multiply a vector (1x n) with matrix (n x n) and get a result as a matrix .Each element of vector should be multipied with coresponding column of matrix i.e. : 1-st element with 1-st column then 2-nd with 2-nd .The command kron gives the desired outcome but it is too vast and every n+n of its outcome is that I am interested in .Thank for any clue !

Best Answer

doc bsxfun
and more specific:
bsxfun(@times,matrix,vector)