示例#1
0
        //=============================================================================
        /// <summary>
        /// Get dimensions of a named matrix in scilab
        /// </summary>
        /// <returns>a int array.
        /// if variable name does not exist dimensions are null </returns>
        public unsafe int[] getNamedVarDimension(string matrixName)
        {
            int[] iDim  = null;
            int   iRows = 0;
            int   iCols = 0;

            System.IntPtr             ptrEmpty = new System.IntPtr();
            Scilab_cs_wrapper.api_Err SciErr   = Scilab_cs_wrapper.getNamedVarDimension(ptrEmpty, matrixName, &iRows, &iCols);
            if (SciErr.iErr == 0)
            {
                iDim    = new int[2];
                iDim[0] = iRows;
                iDim[1] = iCols;
            }
            return(iDim);
        }