public static DoubleMatrix ElementWiseMultiply(
	DoubleMatrix left,
	ReadOnlyDoubleMatrix right
)Public Shared Function ElementWiseMultiply ( 
	left As DoubleMatrix,
	right As ReadOnlyDoubleMatrix
) As DoubleMatrixpublic:
static DoubleMatrix^ ElementWiseMultiply(
	DoubleMatrix^ left, 
	ReadOnlyDoubleMatrix^ right
)static member ElementWiseMultiply : 
        left : DoubleMatrix * 
        right : ReadOnlyDoubleMatrix -> DoubleMatrix 
            Let  and  
            
 be the left
            number of rows and columns, respectively, and consider its generic entry
            
            Analogously, Let  and  
            
 be the right
            number of rows and columns, respectively, and let its generic entry given by
            
            The method returns a matrix 
            whose generic entry is 
            
 
            provided that the dimensions of left agree 
            with those of right; otherwise, an exception
            is thrown.
            
In the following example, some matrices are element wise multiplied.
using System;
namespace Novacta.Analytics.CodeExamples
{
    public class ElementWiseMultiplyExample0  
    {
        public void Main()
        {
            // Create the left operand.
            var data = new double[6] {
                0,  2, 4,
                1,  3, 5
            };
            var left = DoubleMatrix.Dense(2, 3, data, StorageOrder.RowMajor);
            Console.WriteLine("left =");
            Console.WriteLine(left);
            // Create the right operand.
            data = [
                0,  20,  40,
               10,  30,  50
            ];
            var right = DoubleMatrix.Dense(2, 3, data, StorageOrder.RowMajor);
            Console.WriteLine("right =");
            Console.WriteLine(right);
            // Element wise multiply left by right.
            var result = DoubleMatrix.ElementWiseMultiply(left, right);
            Console.WriteLine();
            Console.WriteLine("Element wise multiplication: left * right =");
            Console.WriteLine(result);
            // Class ReadOnlyDoubleMatrix supports element wise multiplications
            // where some arguments are read-only matrices.
            // Compute the product using a read-only wrapper of left.
            ReadOnlyDoubleMatrix readOnlyLeft = left.AsReadOnly();
            result = ReadOnlyDoubleMatrix.ElementWiseMultiply(readOnlyLeft, right);
            Console.WriteLine();
            Console.WriteLine("Element wise multiplication: readOnlyLeft * right =");
            Console.WriteLine(result);
        }
    }
}
// Executing method Main() produces the following output:
// 
// left =
// 0                2                4                
// 1                3                5                
// 
// 
// right =
// 0                20               40               
// 10               30               50               
// 
// 
// 
// Element wise multiplication: left * right =
// 0                40               160              
// 10               90               250              
// 
// 
// 
// Element wise multiplication: readOnlyLeft * right =
// 0                40               160              
// 10               90               250              
// 
//| ArgumentNullException | left is null. -or- right is null.  | 
| ArgumentException | left and right have not the same number of rows and columns. |