====== Different Types of Multiplication in Matlab/Octave ====== % Different types of multiplications in Octave/Matlab % 2015-04-13, RB x = [1 2 3]' % column vector y = [10 20 30]' % column vector y = y' % row vector, transposed s = y*x % scalar product, left row, right column, result type is scalar C = x*y % Cartesian product, matrix with all possible combinations y2 = y.*y % element-wise multiplication, result type is row vector x2 = x.*x % element-wise multiplication, result type is column vector z = x.*y' % element-wise multiplication, result type is column vector