Mul

Parent Previous Next

Mul


Element-wise multiplication


Note


This is the element wise multiplication. If you want to multiply two matrices, use "*" operator directly.


Syntax


mul(x,y)

x, y are scalars

Return a scalar which is the product of x and y


x is matrix, y is scalar

Return a matrix whose element is the product of the element in x to y


x, y are matrices of the the same size

Return a matrix whose element is the product of the element in x to the element in y


Example


Input

Output

mul(1,2)

mul([1,2,3], [4,5,6])

mul([1,2,3;4,5,6], 2)

mul([1,2,3;4,5,6], [4,5,6;7,8,9])


See Also


Created with the Personal Edition of HelpNDoc: Produce Kindle eBooks easily