Exemple #1
0
        //=============================================================================
        /// <summary>
        /// Read a named matrix of complex double in Scilab (Imag part)
        /// </summary>
        /// <param name="matrixName">variable name</param>
        /// <returns> img part. If Variable name does not exist returns null</returns>
        public unsafe double[] readNamedComplexMatrixOfDoubleImgPart(string matrixName)
        {
            double[] dImagPart = null;
            int[]    iDim      = getNamedVarDimension(matrixName);
            if (iDim != null)
            {
                int iRows = iDim[0];
                int iCols = iDim[1];

                double[] dRealPart = new double[iRows * iCols];
                dImagPart = new double[iRows * iCols];

                System.IntPtr ptrEmpty = new System.IntPtr();

                Scilab_cs_wrapper.api_Err SciErr = Scilab_cs_wrapper.readNamedComplexMatrixOfDouble(ptrEmpty, matrixName,
                                                                                                    &iRows, &iCols,
                                                                                                    dRealPart,
                                                                                                    dImagPart);
            }
            return(dImagPart);
        }