Accord.Math.ComplexMatrix.Re C# (CSharp) Method

Re() public static method

Returns the real matrix part of the complex matrix c.
public static Re ( this c ) : ].double[
c this A matrix of complex numbers.
return ].double[
        public static double[,] Re(this Complex[,] c)
        {
            if (c == null)
                throw new ArgumentNullException("c");

            int rows = c.GetLength(0);
            int cols = c.GetLength(1);

            var re = new double[rows, cols];
            for (int i = 0; i < rows; i++)
                for (int j = 0; j < cols; j++)
                    re[i, j] = c[i, j].Real;

            return re;
        }

Same methods

ComplexMatrix::Re ( this c ) : double[]