/// <summary> /// Creates a 3 dimensional matrix, for Image Processing /// </summary> /// <param name="rows"></param> /// <param name="cols"></param> /// <param name="planes"></param> /// <param name="t"></param> public Matrix(int rows, int cols, int planes, Type t) { int [] dims = { rows, cols, planes }; MATInvoke.mxClassID tt = MATInvoke.Type2ClassID(t); max = MATInvoke.mxCreateNumericArray(3, dims, tt, MATInvoke.mxComplexity.mxREAL); }
/// <summary> /// Creates a Matrix with the specific type /// </summary> /// <param name="rows"></param> /// <param name="cols"></param> /// <param name="t"></param> public Matrix(int rows, int cols, Type t) { MATInvoke.mxClassID tt = MATInvoke.Type2ClassID(t); max = MATInvoke.mxCreateNumericMatrix(rows, cols, tt, MATInvoke.mxComplexity.mxREAL); }
/// <summary> /// Create it from an mxArray /// </summary> /// <param name="ma"></param> internal MatrixDescription(IntPtr ma) { if(ma == IntPtr.Zero) return; Rows = MATInvoke.mxGetM(ma); Cols = MATInvoke.mxGetN(ma); Type = MATInvoke.mxGetClassID(ma); Name = MATInvoke.mxGetName(ma); }