Documentation Center

  • Trial Software
  • Product Updates

Access Data

Read or write data to array

Fortran Functions

mxGetNumberOfDimensions Number of dimensions in array
mxGetElementSize Number of bytes required to store each data element
mxGetDimensions Pointer to dimensions array
mxSetDimensions Modify number of dimensions and size of each dimension
mxGetNumberOfElements Number of elements in array
mxCalcSingleSubscript Offset from first element to desired element
mxGetM Number of rows in array
mxSetM Set number of rows in array
mxGetN Number of columns in array
mxSetN Set number of columns in array
mxGetScalar Real component of first data element in array
mxGetPr Real data elements in array of type DOUBLE
mxSetPr Set new real data elements in array of type DOUBLE
mxGetPi Imaginary data elements in array of type DOUBLE
mxSetPi Set new imaginary data elements in array of type DOUBLE
mxGetData Pointer to real numeric data elements in array
mxSetData Set pointer to real numeric data elements in array
mxGetImagData Pointer to imaginary data elements in array
mxSetImagData Set pointer to imaginary data elements in array
mxGetClassID Class of array
mxGetClassName Class of array as string
mxGetProperty Value of public property of MATLAB object
mxSetProperty Set value of public property of MATLAB object
mxGetField Get field value from structure array, given index and field name
mxSetField Set field value in structure array, given index and field name
mxGetNumberOfFields Number of fields in structure array
mxGetFieldNameByNumber Get field name from structure array, given field number
mxGetFieldNumber Get field number from structure array, given field name
mxGetFieldByNumber Get field value from structure array, given index and field number
mxSetFieldByNumber Set field value in structure array, given index and field number
mxAddField Add field to structure array
mxRemoveField Remove field from structure array
mxGetCell Get contents of cell array
mxSetCell Set contents of cell array
mxGetNzmax Number of elements in IR, PR, and PI arrays
mxSetNzmax Set storage space for nonzero elements
mxGetIr Sparse matrix IR array
mxSetIr IR array of sparse array
mxGetJc Sparse matrix JC array
mxSetJc JC array of sparse array
Was this topic helpful?