Suppose I have a matrix:
A = [ a, b, c; d, e, f ]; and a vector:
b = [ x; y; z ]; What I want is resultant matrix as:
C = [ a*x, b*y, c*z; d*x, e*y, f*z ]; How can I do this? Essentially, I want to multiply matrix (dimension: mxn) with a vector (nx1) and get resultant matrix mxn.
When I do it onAs requested in comments (using octave by usingversion *3.8.0 operator, I receive normal matrix multiplication answer. Example):
octave> A = [ 1,2,3;4,5,6]; B=[10;20;30]; octave> A*B ans = 140 320 octave:14>octave> A.*B error: product: nonconformant arguments (op1 is 2x3, op2 is 3x1) octave:14>octave> bsxfun(@times, A, B) error: bsxfun: nonconformant dimensions: 2x3 and 3x1