MATLAB Production Server C Client R2025a component: mds_c_client, module directory: deployment_server/client/c/mps, copyright: MathWorks |

Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Enumerations | Functions
client.h File Reference
`#include <limits.h>`
`#include <stddef.h>`
`#include <stdint.h>`
Include dependency graph for client.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Data Structures
struct | matlabStackFrame
| Entry in the MATLAB runtime stack. More...
struct | mpsClientRuntime
| MATLAB Production Server client API container. More...
struct | mpsErrorInfo
| Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context. More...
struct | mpsErrorInfoGeneric
| Details about an error not caused by non-200 HTTP errors or MATLAB execution errors. More...
struct | mpsErrorInfoHTTP
| Details about a non-200 HTTP response. More...
struct | mpsErrorInfoMATLAB
| Details about a MATLAB execution error. More...

## Macros
#define | MPS_CLIENT_1_0 0x00010000
| Copyright 2015-2022 The MathWorks, Inc.
#define | MPS_CLIENT_1_1 0x00010001
#define | MPS_DLL_EXPORT_SYM
#define | MPS_DLL_IMPORT_SYM
#define | MPS_MAX_VER MPS_CLIENT_1_1
#define | MPSCLIENT_PUBLISHED_API MPS_DLL_EXPORT_SYM
#define | MPSCLIENT_PUBLISHED_API_EXTERN_C extern "C" MPSCLIENT_PUBLISHED_API
#define | TMW_BITS_PER_INT -1
#define | TMW_BITS_PER_LONG -1
#define | TMW_BITS_PER_SCHAR -1
#define | TMW_BITS_PER_SHRT -1

## Typedefs
typedef UINT16_T | CHAR16_T
typedef struct matlabStackFrame | matlabStackFrame
| Entry in the MATLAB runtime stack.
typedef struct mpsArray | mpsArray
| Fundamental type underlying MATLAB data.
typedef CHAR16_T | mpsChar
typedef enum mpsClassID | mpsClassID
| Flag identifying class of array.
typedef struct mpsClientConfig | mpsClientConfig
| Structure containing information configuring the connection between the client and a server instance.
typedef struct mpsClientContext | mpsClientContext
| Establishes a connection between a client and a server.
typedef struct mpsClientRuntime | mpsClientRuntime
| MATLAB Production Server client API container.
typedef enum mpsComplexity | mpsComplexity
| Flag specifying whether array has imaginary components.
typedef struct mpsErrorInfo | mpsErrorInfo
| Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context.
typedef struct mpsErrorInfoGeneric | mpsErrorInfoGeneric
| Details about an error not caused by non-200 HTTP errors or MATLAB execution errors.
typedef struct mpsErrorInfoHTTP | mpsErrorInfoHTTP
| Details about a non-200 HTTP response.
typedef struct mpsErrorInfoMATLAB | mpsErrorInfoMATLAB
| Details about a MATLAB execution error.
typedef enum mpsErrorInfoType | mpsErrorInfoType
| Types of errors that can be thrown when MATLAB function invocation fails.
typedef uint64 | mpsIndex
| Type that represents index values, such as indices into arrays.
typedef bool | mpsLogical
| Type for logical array.
typedef uint64 | mpsSize
| Type that represents size values, such as array dimensions.
typedef enum mpsStatus | mpsStatus
| Error status codes for all methods which are part of the MATLAB Production Server client API.
typedef uint64_t | uint64

## Enumerations
enum | mpsClassID { mpsUINT8_CLASS , mpsINT8_CLASS , mpsUINT16_CLASS , mpsINT16_CLASS , mpsUINT32_CLASS , mpsINT32_CLASS , mpsUINT64_CLASS , mpsINT64_CLASS , mpsSINGLE_CLASS , mpsDOUBLE_CLASS , mpsLOGICAL_CLASS , mpsCHAR_CLASS , mpsSTRUCT_CLASS , mpsCELL_CLASS }
| Flag identifying class of array. More...
enum | mpsComplexity { mpsREAL , mpsCOMPLEX }
| Flag specifying whether array has imaginary components. More...
enum | mpsErrorInfoType { MPS_HTTP_ERROR_INFO , MPS_MATLAB_ERROR_INFO , MPS_GENERIC_ERROR_INFO }
| Types of errors that can be thrown when MATLAB function invocation fails. More...
enum | mpsStatus { MPS_OK , MPS_FAILURE }
| Error status codes for all methods which are part of the MATLAB Production Server client API. More...

## Functions
int | mpsAddField (mpsArray *mlArr, const char *fieldname)
| Add a field to an array of struct.
char * | mpsArrayToString (const mpsArray *mlArr)
| Copy the character data of a string array into a C-style string.
mpsIndex | mpsCalcSingleSubscript (const mpsArray *mlArr, mpsSize nsubs, mpsIndex *subs)
| Determine how many elements there are between the beginning of an array and a given element.
mpsArray * | mpsCreateCellArray (mpsSize ndim, const mpsSize *dims)
| Create a N-dimensional cell array.
mpsArray * | mpsCreateCellMatrix (mpsSize m, mpsSize n)
| Create a two-dimensional cell array.
mpsArray * | mpsCreateCharArray (mpsSize ndim, const mpsSize *dims)
| Create a N-dimensional string array.
mpsArray * | mpsCreateCharMatrixFromStrings (mpsSize rows, const char **str)
| Create a two-dimensional string array.
mpsArray * | mpsCreateDoubleMatrix (mpsSize m, mpsSize n, mpsComplexity complexFlag)
| Create a two-dimensional double-precision floating-point array.
mpsArray * | mpsCreateDoubleScalar (double value)
| Create a scalar double-precision floating-point array.
mpsArray * | mpsCreateLogicalArray (mpsSize ndim, const mpsSize *dims)
| Create a N-dimensional logical array.
mpsArray * | mpsCreateLogicalMatrix (mpsSize m, mpsSize n)
| Create a two-dimensional logical array.
mpsArray * | mpsCreateLogicalScalar (mpsLogical value)
| Create a scalar logical array.
mpsArray * | mpsCreateNumericArray (mpsSize ndim, const mpsSize *dims, mpsClassID classid, mpsComplexity complexFlag)
| Create a two-dimensional numeric array.
mpsArray * | mpsCreateNumericMatrix (mpsSize m, mpsSize n, mpsClassID classid, mpsComplexity complexFlag)
| Create a two-dimensional numeric array.
mpsArray * | mpsCreateSparse (mpsSize m, mpsSize n, mpsSize nzmax, mpsComplexity complexFlag)
| Create a two-dimensional sparse array.
mpsArray * | mpsCreateSparseLogicalMatrix (mpsSize m, mpsSize n, mpsSize nzmax)
| Create a two-dimensional sparse array.
mpsArray * | mpsCreateString (const char *str)
| Create a string array.
mpsArray * | mpsCreateStructArray (mpsSize ndim, const mpsSize *dims, int nfields, const char **fieldnames)
| Create a N-dimensional struct array.
mpsArray * | mpsCreateStructMatrix (mpsSize m, mpsSize n, int nfields, const char **fieldnames)
| Create a two-dimensional struct array.
void | mpsDestroyArray (mpsArray *mlArr)
| Deallocate the memory occupied by an array.
mpsArray * | mpsDuplicateArray (const mpsArray *mlArr)
| Make a deep copy of input `mpsArray`.
void | mpsFree (void *data)
| Deallocate heap space using the MATLAB memory management facility.
mpsArray * | mpsGetCell (const mpsArray *mlArr, mpsIndex index)
| Access the contents of a cell array at a specified index.
mpsChar * | mpsGetChars (const mpsArray *mlArr)
| Access the data in a character array.
mpsClassID | mpsGetClassID (const mpsArray *mlArr)
| Determine the class of an array.
const char * | mpsGetClassName (const mpsArray *mlArr)
| Determine the class of an array.
void * | mpsGetData (const mpsArray *mlArr)
| Access the real numeric data in an array.
const mpsSize * | mpsGetDimensions (const mpsArray *mlArr)
| Determine how many elements are in each dimension of an array.
size_t | mpsGetElementSize (const mpsArray *mlArr)
| Determine the number of bytes in each data element of an array.
mpsArray * | mpsGetField (const mpsArray *mlArr, mpsIndex index, const char *fieldname)
| Access the value held in the specified element of the specified field of an array of struct.
mpsArray * | mpsGetFieldByNumber (const mpsArray *mlArr, mpsIndex index, int fieldnumber)
| Access the value held in the specified field number at the indexed element of an array.
const char * | mpsGetFieldNameByNumber (const mpsArray *mlArr, int fieldnumber)
| Determine the name of a field in an array of struct given the field number.
int | mpsGetFieldNumber (const mpsArray *mlArr, const char *fieldname)
| Determine the number of a field in an array of struct given the field name.
void * | mpsGetImagData (const mpsArray *mlArr)
| Access the imaginary data in an array.
const char * | mpsGetInitializationErrorMessage (void)
| Returns the error message representing the failure in global initialization that sets up the programming environment for MATLAB Production Server client.
mpsIndex * | mpsGetIr (const mpsArray *mlArr)
| Determine the starting address of the `ir` array in a sparse array.
mpsIndex * | mpsGetJc (const mpsArray *mlArr)
| Determine the starting address of the `jc` array in a sparse array.
mpsLogical * | mpsGetLogicals (const mpsArray *mlArr)
| Access the first logical element in an array.
size_t | mpsGetM (const mpsArray *mlArr)
| Determine the first dimension of an array.
size_t | mpsGetN (const mpsArray *mlArr)
| Determine the number of columns in an array.
mpsSize | mpsGetNumberOfDimensions (const mpsArray *mlArr)
| Determine the number of dimensions in an array.
size_t | mpsGetNumberOfElements (const mpsArray *mlArr)
| Determine how many elements are in the array.
int | mpsGetNumberOfFields (const mpsArray *mlArr)
| Determine the number of fields in an array of struct.
mpsSize | mpsGetNzmax (const mpsArray *mlArr)
| Determine the number of non-zero elements in a sparse array.
double * | mpsGetPi (const mpsArray *mlArr)
| Access the imaginary data in an array of doubles.
double * | mpsGetPr (const mpsArray *mlArr)
| Access the real data in an array of doubles.
double | mpsGetScalar (const mpsArray *mlArr)
| Determine the value of the first real element of an array.
int | mpsGetString (const mpsArray *mlArr, char *str, mpsSize len)
| Copy the character data of a string array into a C-style string.
mpsClientRuntime * | mpsInitialize (void)
| Set up the programming environment for MATLAB Production Server client based on version 1.0.
mpsClientRuntime * | mpsInitializeEx (int version)
| Set up the programming environment for MATLAB Production Server client based on the version number provided by the user.
bool | mpsIsCell (const mpsArray *mlArr)
| Determine whether input is cell array.
bool | mpsIsChar (const mpsArray *mlArr)
| Determine whether `mpsArray` represents a string array.
bool | mpsIsClass (const mpsArray *mlArr, const char *classname)
| Determine whether array is member of specified class.
bool | mpsIsComplex (const mpsArray *mlArr)
| Determine whether `mpsArray` contains an imaginary part.
bool | mpsIsDouble (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as double-precision, floating-point numbers.
bool | mpsIsEmpty (const mpsArray *mlArr)
| Determine whether array is empty.
bool | mpsIsInt16 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as signed 16-bit integers.
bool | mpsIsInt32 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as signed 32-bit integers.
bool | mpsIsInt64 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as signed 64-bit integers.
bool | mpsIsInt8 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as signed 8-bit integers.
bool | mpsIsLogical (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as `mpsLogical`.
bool | mpsIsLogicalScalar (const mpsArray *mlArr)
| Determine whether MATLAB treats the scalar data in the `mpsArray` as logical or numerical.
bool | mpsIsLogicalScalarTrue (const mpsArray *mlArr)
| Determine whether scalar array is true.
bool | mpsIsNumeric (const mpsArray *mlArr)
| Determine whether `mpsArray` contains numeric data.
bool | mpsIsSingle (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as single-precision, floating-point numbers.
bool | mpsIsSparse (const mpsArray *mlArr)
| Determine whether array is sparse.
bool | mpsIsStruct (const mpsArray *mlArr)
| Determine whether input is structure array.
bool | mpsIsUint16 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as unsigned 16-bit integers.
bool | mpsIsUint32 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as unsigned 32-bit integers.
bool | mpsIsUint64 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as unsigned 64-bit integers.
bool | mpsIsUint8 (const mpsArray *mlArr)
| Determine whether `mpsArray` represents data as unsigned 8-bit integers.
void | mpsRemoveField (mpsArray *mlArr, int fieldnumber)
| Delete a field from an array of struct.
void | mpsSetCell (mpsArray *mlArr, mpsIndex index, mpsArray *value)
| Set the contents of a cell array at a specified index.
int | mpsSetDimensions (mpsArray *mlArr, const mpsSize *dims, mpsSize ndim)
| Modify number of dimensions and size of each dimension of an array.
void | mpsSetField (mpsArray *mlArr, mpsIndex index, const char *fieldname, mpsArray *pvalue)
| Set the value held in the specified element of the specified field of an array of struct.
void | mpsSetFieldByNumber (mpsArray *mlArr, mpsIndex index, int fieldnumber, mpsArray *pvalue)
| Set the value held in the specified field number at the indexed element of an array.
void | mpsSetM (mpsArray *mlArr, mpsSize m)
| Set the first dimension of an array.
void | mpsSetN (mpsArray *mlArr, mpsSize n)
| Set the number of columns in an array.
void | mpsSetNzmax (mpsArray *mlArr, mpsSize nzmax)
| Set the maximum number of non-zero elements in a sparse array.
void | mpsTerminate (void)
| Perform global clean up of resources consumed by MATLAB Production Server client environment.

## Macro Definition Documentation

## ◆ MPS_CLIENT_1_0

#define MPS_CLIENT_1_0 0x00010000

Copyright 2015-2022 The MathWorks, Inc.

Definition at line 7 of file client.h.

## ◆ MPS_CLIENT_1_1

#define MPS_CLIENT_1_1 0x00010001

Definition at line 8 of file client.h.

## ◆ MPS_DLL_EXPORT_SYM

#define MPS_DLL_EXPORT_SYM

Definition at line 21 of file client.h.

## ◆ MPS_DLL_IMPORT_SYM

#define MPS_DLL_IMPORT_SYM

Definition at line 22 of file client.h.

## ◆ MPS_MAX_VER

#define MPS_MAX_VER MPS_CLIENT_1_1

Definition at line 11 of file client.h.

## ◆ MPSCLIENT_PUBLISHED_API

#define MPSCLIENT_PUBLISHED_API MPS_DLL_EXPORT_SYM

Definition at line 26 of file client.h.

## ◆ MPSCLIENT_PUBLISHED_API_EXTERN_C

#define MPSCLIENT_PUBLISHED_API_EXTERN_C extern "C" MPSCLIENT_PUBLISHED_API

Definition at line 32 of file client.h.

## ◆ TMW_BITS_PER_INT

#define TMW_BITS_PER_INT -1

Definition at line 79 of file client.h.

## ◆ TMW_BITS_PER_LONG

#define TMW_BITS_PER_LONG -1

Definition at line 91 of file client.h.

## ◆ TMW_BITS_PER_SCHAR

#define TMW_BITS_PER_SCHAR -1

Definition at line 103 of file client.h.

## ◆ TMW_BITS_PER_SHRT

#define TMW_BITS_PER_SHRT -1

Definition at line 115 of file client.h.

## Typedef Documentation

## ◆ CHAR16_T

typedef UINT16_T CHAR16_T

Definition at line 138 of file client.h.

## ◆ matlabStackFrame

typedef struct matlabStackFrame matlabStackFrame

Entry in the MATLAB runtime stack.

## ◆ mpsArray

typedef struct mpsArray mpsArray

Fundamental type underlying MATLAB data.

Use any of the `mpsCreate` functions to create data, and the corresponding `mpsDestroyArray` function to free memory.

Definition at line 55 of file client.h.

## ◆ mpsChar

typedef CHAR16_T mpsChar

Definition at line 141 of file client.h.

## ◆ mpsClassID

typedef enum mpsClassID mpsClassID

Flag identifying class of array.

## ◆ mpsClientConfig

typedef struct mpsClientConfig mpsClientConfig

Structure containing information configuring the connection between the client and a server instance.

See also
  `mpsClientRuntime`

Definition at line 61 of file client.h.

## ◆ mpsClientContext

typedef struct mpsClientContext mpsClientContext

Establishes a connection between a client and a server.

An instance of `mpsClientContext` should not be shared across multiple threads at the same time. In a multi-threaded environment, each thread should get its own instance of `mpsClientContext`.

See also
  `mpsClientRuntime`

Definition at line 69 of file client.h.

## ◆ mpsClientRuntime

typedef struct mpsClientRuntime mpsClientRuntime

MATLAB Production Server client API container.

`mpsClientRuntime` provides functions needed to create the MATLAB Production Server client execution context, configure it, and use the execution context to execute MATLAB functions hosted by an MATLAB Production Server instance.

## ◆ mpsComplexity

typedef enum mpsComplexity mpsComplexity

Flag specifying whether array has imaginary components.

## ◆ mpsErrorInfo

typedef struct mpsErrorInfo mpsErrorInfo

Error thrown when a MATLAB function is invoked by the MATLAB Production Server client context.

## ◆ mpsErrorInfoGeneric

typedef struct mpsErrorInfoGeneric mpsErrorInfoGeneric

Details about an error not caused by non-200 HTTP errors or MATLAB execution errors.

## ◆ mpsErrorInfoHTTP

typedef struct mpsErrorInfoHTTP mpsErrorInfoHTTP

Details about a non-200 HTTP response.

## ◆ mpsErrorInfoMATLAB

typedef struct mpsErrorInfoMATLAB mpsErrorInfoMATLAB

Details about a MATLAB execution error.

## ◆ mpsErrorInfoType

typedef enum mpsErrorInfoType mpsErrorInfoType

Types of errors that can be thrown when MATLAB function invocation fails.

## ◆ mpsIndex

typedef uint64 mpsIndex

Type that represents index values, such as indices into arrays.

Definition at line 51 of file client.h.

## ◆ mpsLogical

typedef bool mpsLogical

Type for logical array.

All logical `mpsArray`s store their data elements as `mpsLogical` rather than as `bool`.

Definition at line 158 of file client.h.

## ◆ mpsSize

typedef uint64 mpsSize

Type that represents size values, such as array dimensions.

Definition at line 48 of file client.h.

## ◆ mpsStatus

typedef enum mpsStatus mpsStatus

Error status codes for all methods which are part of the MATLAB Production Server client API.

## ◆ uint64

typedef uint64_t uint64

Definition at line 44 of file client.h.

## Enumeration Type Documentation

## ◆ mpsClassID

enum mpsClassID

Flag identifying class of array.

Enumerator
mpsUINT8_CLASS | Identifies a numeric `mpsArray` whose data is stored as either `unsigned char` or `byte`.
mpsINT8_CLASS | Identifies a numeric `mpsArray` whose data is stored as either `char` or `byte`.
mpsUINT16_CLASS | Identifies a numeric `mpsArray` whose data is stored as `unsigned short`.
mpsINT16_CLASS | Identifies a numeric `mpsArray` whose data is stored as `short`.
mpsUINT32_CLASS | Identifies a numeric `mpsArray` whose data is stored as `unsigned int`.
mpsINT32_CLASS | Identifies a numeric `mpsArray` whose data is stored as `int`.
mpsUINT64_CLASS | Identifies a numeric `mpsArray` whose data is stored as `unsigned long long`.
mpsINT64_CLASS | Identifies a numeric `mpsArray` whose data is stored as `long long`.
mpsSINGLE_CLASS | Identifies a numeric `mpsArray` whose data is stored as `float`.
mpsDOUBLE_CLASS | Identifies a numeric `mpsArray` whose data is stored as `double`.
mpsLOGICAL_CLASS | Identifies a logical `mpsArray`.
mpsCHAR_CLASS | Identifies a string `mpsArray`.
mpsSTRUCT_CLASS | Identifies a structure `mpsArray`.
mpsCELL_CLASS | Identifies a cell `mpsArray`.

Definition at line 276 of file client.h.

## ◆ mpsComplexity

enum mpsComplexity

Flag specifying whether array has imaginary components.

Enumerator
mpsREAL | Identifies an `mpsArray` with no imaginary components.
mpsCOMPLEX | Identifies an `mpsArray` with imaginary components.

Definition at line 268 of file client.h.

## ◆ mpsErrorInfoType

enum mpsErrorInfoType

Types of errors that can be thrown when MATLAB function invocation fails.

Enumerator
MPS_HTTP_ERROR_INFO | A non-200 HTTP response when MATLAB function in invoked from the client.
MPS_MATLAB_ERROR_INFO | A MATLAB execution error.
MPS_GENERIC_ERROR_INFO | Any error other than MATLAB execution error or a non-200 HTTP response.

Definition at line 161 of file client.h.

## ◆ mpsStatus

enum mpsStatus

Error status codes for all methods which are part of the MATLAB Production Server client API.

Enumerator
MPS_OK | Successful invocation of a method.
MPS_FAILURE | Failure.

Definition at line 257 of file client.h.

## Function Documentation

## ◆ mpsAddField()

int mpsAddField | ( | mpsArray * | mlArr,
|  | const char * | fieldname
| ) |  |

Add a field to an array of struct.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  fieldname | Name of the field to add.

Returns
  Field number on success, or `-1` if inputs are invalid or an out-of-memory condition occurs.

## ◆ mpsArrayToString()

char * mpsArrayToString | ( | const mpsArray * | mlArr | ) |

Copy the character data of a string array into a C-style string.

Parameters

  mlArr | Pointer to an `mpsArray` having the `mpsCHAR_CLASS` class.

Returns
  `NULL` terminated string.

## ◆ mpsCalcSingleSubscript()

mpsIndex mpsCalcSingleSubscript | ( | const mpsArray * | mlArr,
|  | mpsSize | nsubs,
|  | mpsIndex * | subs
| ) |  |

Determine how many elements there are between the beginning of an array and a given element.

Arrays in MATLAB are stored column-major, so accessing the elements of an `mpsArray` using standard C indexing will produce a transposed array. This function accepts row-major dimension subscripts and calculate the proper column-major index to the the desired value.

Parameters

  mlArr | Pointer to an `mpsArray`.
  nsubs | Number of elements in the subs array.
  subs | Array of integers. Each value in the array specifies that dimension's subscript.

Returns
  Number of elements, or index, between the start of the array and the specified subscript. This is the linear index equivalent of the subscripts calculated as if the array were stored column major as they are in MATLAB.

## ◆ mpsCreateCellArray()

mpsArray * mpsCreateCellArray | ( | mpsSize | ndim,
|  | const mpsSize * | dims
| ) |  |

Create a N-dimensional cell array.

Parameters

  ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2.
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.

Returns
  Pointer to the created array.

## ◆ mpsCreateCellMatrix()

mpsArray * mpsCreateCellMatrix | ( | mpsSize | m,
|  | mpsSize | n
| ) |  |

Create a two-dimensional cell array.

Parameters

  m | Number of rows.
  n | Number of columns.

Returns
  Pointer to the created array.

## ◆ mpsCreateCharArray()

mpsArray * mpsCreateCharArray | ( | mpsSize | ndim,
|  | const mpsSize * | dims
| ) |  |

Create a N-dimensional string array.

Parameters

  ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2.
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.

Returns
  Pointer to the created array.

## ◆ mpsCreateCharMatrixFromStrings()

mpsArray * mpsCreateCharMatrixFromStrings | ( | mpsSize | rows,
|  | const char ** | str
| ) |  |

Create a two-dimensional string array.

Parameters

  rows | Number of rows in the created array. The value you specify is the number of strings in `str`.
  str | Array of strings containing at least `rows` strings.

Returns
  Pointer to the created array.

## ◆ mpsCreateDoubleMatrix()

mpsArray * mpsCreateDoubleMatrix | ( | mpsSize | m,
|  | mpsSize | n,
|  | mpsComplexity | complexFlag
| ) |  |

Create a two-dimensional double-precision floating-point array.

Parameters

  m | Number of rows.
  n | Number of columns.
  complexFlag | If the array is to contain imaginary data, set to `mpsCOMPLEX`. Otherwise, set to `mpsREAL`.

Returns
  Pointer to the created array.

## ◆ mpsCreateDoubleScalar()

mpsArray * mpsCreateDoubleScalar | ( | double | value | ) |

Create a scalar double-precision floating-point array.

Parameters

  value | Value to which you want to initialize the array.

Returns
  Pointer to the created array.

## ◆ mpsCreateLogicalArray()

mpsArray * mpsCreateLogicalArray | ( | mpsSize | ndim,
|  | const mpsSize * | dims
| ) |  |

Create a N-dimensional logical array.

Parameters

  ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2.
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.

Returns
  Pointer to the created array.

## ◆ mpsCreateLogicalMatrix()

mpsArray * mpsCreateLogicalMatrix | ( | mpsSize | m,
|  | mpsSize | n
| ) |  |

Create a two-dimensional logical array.

Parameters

  m | Number of rows.
  n | Number of columns.

Returns
  Pointer to the created array.

## ◆ mpsCreateLogicalScalar()

mpsArray * mpsCreateLogicalScalar | ( | mpsLogical | value | ) |

Create a scalar logical array.

Parameters

  value | Logical value to which you want to initialize the array.

Returns
  Pointer to the created array.

## ◆ mpsCreateNumericArray()

mpsArray * mpsCreateNumericArray | ( | mpsSize | ndim,
|  | const mpsSize * | dims,
|  | mpsClassID | classid,
|  | mpsComplexity | complexFlag
| ) |  |

Create a two-dimensional numeric array.

Parameters

  ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2.
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.
  classid | Identifier for the class of the array, which determines the way the numerical data is represented in memory.
  complexFlag | If the array is to contain imaginary data, set to `mpsCOMPLEX`. Otherwise, set to `mpsREAL`.

Returns
  Pointer to the created array.

## ◆ mpsCreateNumericMatrix()

mpsArray * mpsCreateNumericMatrix | ( | mpsSize | m,
|  | mpsSize | n,
|  | mpsClassID | classid,
|  | mpsComplexity | complexFlag
| ) |  |

Create a two-dimensional numeric array.

Parameters

  m | Number of rows.
  n | Number of columns.
  classid | Identifier for the class of the array, which determines the way the numerical data is represented in memory.
  complexFlag | If the array is to contain imaginary data, set to `mpsCOMPLEX`. Otherwise, set to `mpsREAL`.

Returns
  Pointer to the created array.

## ◆ mpsCreateSparse()

mpsArray * mpsCreateSparse | ( | mpsSize | m,
|  | mpsSize | n,
|  | mpsSize | nzmax,
|  | mpsComplexity | complexFlag
| ) |  |

Create a two-dimensional sparse array.

Parameters

  m | Number of rows.
  n | Number of columns.
  nzmax | Number of elements to allocate to hold the `pr`, `ir`, and, if `complexFlag` is `mpsCOMPLEX`), `pi` arrays. Set the value to be greater than or equal to the number of non-zero elements you plan to put into the array, but make sure that `nzmax` is less than or equal to `m*n`.
  complexFlag | If the array is to contain imaginary data, set to `mpsCOMPLEX`. Otherwise, set to `mpsREAL`.

Returns
  Pointer to the created array.

## ◆ mpsCreateSparseLogicalMatrix()

mpsArray * mpsCreateSparseLogicalMatrix | ( | mpsSize | m,
|  | mpsSize | n,
|  | mpsSize | nzmax
| ) |  |

Create a two-dimensional sparse array.

Parameters

  m | Number of rows.
  n | Number of columns.
  nzmax | Number of elements to allocate to hold the data. Set the value to be greater than or equal to the number of non-zero elements you plan to put into the array, but make sure that `nzmax` is less than or equal to `m*n`.

Returns
  Pointer to the created array.

## ◆ mpsCreateString()

mpsArray * mpsCreateString | ( | const char * | str | ) |

Create a string array.

Parameters

  str | String that is to serve as the initial data.

Returns
  Pointer to the created array.

## ◆ mpsCreateStructArray()

mpsArray * mpsCreateStructArray | ( | mpsSize | ndim,
|  | const mpsSize * | dims,
|  | int | nfields,
|  | const char ** | fieldnames
| ) |  |

Create a N-dimensional struct array.

Parameters

  ndim | Number of dimensions. If you specify a value that is less than 2, the number of dimensions is automatically set to 2.
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.
  nfields | Number of fields in each element.
  fieldnames | List of field names.

Returns
  Pointer to the created array.

## ◆ mpsCreateStructMatrix()

mpsArray * mpsCreateStructMatrix | ( | mpsSize | m,
|  | mpsSize | n,
|  | int | nfields,
|  | const char ** | fieldnames
| ) |  |

Create a two-dimensional struct array.

Parameters

  m | Number of rows.
  n | Number of columns.
  nfields | Number of fields in each element.
  fieldnames | List of field names.

Returns
  Pointer to the created array.

## ◆ mpsDestroyArray()

void mpsDestroyArray | ( | mpsArray * | mlArr | ) |

Deallocate the memory occupied by an array.

`mpsDestroyArray` not only deallocates the memory occupied by the array's characteristics fields, but also deallocates all the array's associated data arrays, such as `pr` and `pi` for complex arrays, `ir` and `jc` for sparse arrays, fields of structure arrays, and cells of cell arrays. Do not call `mpsDestroyArray` on an array you are returning it in a left side argument.

Parameters

  mlArr | Array to destroy

## ◆ mpsDuplicateArray()

mpsArray * mpsDuplicateArray | ( | const mpsArray * | mlArr | ) |

Make a deep copy of input `mpsArray`.

Parameters

  mlArr | Pointer to an `mpsArray` to be duplicated

Returns
  Duplicate copy of input `mpsArray`

## ◆ mpsFree()

void mpsFree | ( | void * | data | ) |

Deallocate heap space using the MATLAB memory management facility.

Parameters

  data | Pointer to the beginning of any memory parcel allocated by MATLAB.

## ◆ mpsGetCell()

mpsArray * mpsGetCell | ( | const mpsArray * | mlArr,
|  | mpsIndex | index
| ) |  |

Access the contents of a cell array at a specified index.

Parameters

  mlArr | Pointer to an `mpsArray` cell array.
  index | Number of elements in the cell array between the first element and the desired one.

Returns
  Pointer to the data in specified cell of the array.

## ◆ mpsGetChars()

mpsChar * mpsGetChars | ( | const mpsArray * | mlArr | ) |

Access the data in a character array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Pointer to the imaginary data elements of the array.

## ◆ mpsGetClassID()

mpsClassID mpsGetClassID | ( | const mpsArray * | mlArr | ) |

Determine the class of an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Numeric identifier of the class of the array.

## ◆ mpsGetClassName()

const char * mpsGetClassName | ( | const mpsArray * | mlArr | ) |

Determine the class of an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  String identifier of the class of the array.

## ◆ mpsGetData()

void * mpsGetData | ( | const mpsArray * | mlArr | ) |

Access the real numeric data in an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Pointer to the real data elements of the array.

## ◆ mpsGetDimensions()

const mpsSize * mpsGetDimensions | ( | const mpsArray * | mlArr | ) |

Determine how many elements are in each dimension of an array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  Pointer to the first element in the dimensions array. Each integer in the dimensions array represents the number of elements in a particular dimension. The array is not `NULL` terminated.

## ◆ mpsGetElementSize()

size_t mpsGetElementSize | ( | const mpsArray * | mlArr | ) |

Determine the number of bytes in each data element of an array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  Number of bytes required to store one element of the specified array.

## ◆ mpsGetField()

mpsArray * mpsGetField | ( | const mpsArray * | mlArr,
|  | mpsIndex | index,
|  | const char * | fieldname
| ) |  |

Access the value held in the specified element of the specified field of an array of struct.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  index | Index of the desired element.
  fieldname | Name of the field whose value you want to extract.

Returns
  Pointer to the `mpsArray` in the specified field at the specified `fieldname`.

## ◆ mpsGetFieldByNumber()

mpsArray * mpsGetFieldByNumber | ( | const mpsArray * | mlArr,
|  | mpsIndex | index,
|  | int | fieldnumber
| ) |  |

Access the value held in the specified field number at the indexed element of an array.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  index | Index of the desired element.
  fieldnumber | Number of a field in the struct.

Returns
  Pointer to the `mpsArray` in the specified field for the desired element.

## ◆ mpsGetFieldNameByNumber()

const char * mpsGetFieldNameByNumber | ( | const mpsArray * | mlArr,
|  | int | fieldnumber
| ) |  |

Determine the name of a field in an array of struct given the field number.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  fieldnumber | Number of a field in the struct.

Returns
  Pointer to the name of the specified field.

## ◆ mpsGetFieldNumber()

int mpsGetFieldNumber | ( | const mpsArray * | mlArr,
|  | const char * | fieldname
| ) |  |

Determine the number of a field in an array of struct given the field name.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  fieldname | Name of a field in the struct.

Returns
  Field number of the specified field.

## ◆ mpsGetImagData()

void * mpsGetImagData | ( | const mpsArray * | mlArr | ) |

Access the imaginary data in an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Pointer to the imaginary data elements of the array.

## ◆ mpsGetInitializationErrorMessage()

const char * mpsGetInitializationErrorMessage | ( | void |  | ) |

Returns the error message representing the failure in global initialization that sets up the programming environment for MATLAB Production Server client.

## ◆ mpsGetIr()

mpsIndex * mpsGetIr | ( | const mpsArray * | mlArr | ) |

Determine the starting address of the `ir` array in a sparse array.

Parameters

  mlArr | Pointer to a sparse `mpsArray`.

Returns
  Pointer to the first element in the `ir` array.

## ◆ mpsGetJc()

mpsIndex * mpsGetJc | ( | const mpsArray * | mlArr | ) |

Determine the starting address of the `jc` array in a sparse array.

Parameters

  mlArr | Pointer to a sparse `mpsArray`.

Returns
  Pointer to the first element in the `jc` array.

## ◆ mpsGetLogicals()

mpsLogical * mpsGetLogicals | ( | const mpsArray * | mlArr | ) |

Access the first logical element in an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Pointer to the first logical element in the array.

## ◆ mpsGetM()

size_t mpsGetM | ( | const mpsArray * | mlArr | ) |

Determine the first dimension of an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  First dimension of the array.

## ◆ mpsGetN()

size_t mpsGetN | ( | const mpsArray * | mlArr | ) |

Determine the number of columns in an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Number of columns in the array.

## ◆ mpsGetNumberOfDimensions()

mpsSize mpsGetNumberOfDimensions | ( | const mpsArray * | mlArr | ) |

Determine the number of dimensions in an array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  Number of dimensions in the array.

## ◆ mpsGetNumberOfElements()

size_t mpsGetNumberOfElements | ( | const mpsArray * | mlArr | ) |

Determine how many elements are in the array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  Number of elements in the array.

## ◆ mpsGetNumberOfFields()

int mpsGetNumberOfFields | ( | const mpsArray * | mlArr | ) |

Determine the number of fields in an array of struct.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.

Returns
  Number of fields.

## ◆ mpsGetNzmax()

mpsSize mpsGetNzmax | ( | const mpsArray * | mlArr | ) |

Determine the number of non-zero elements in a sparse array.

Parameters

  mlArr | Pointer to a sparse `mpsArray`.

Returns
  Number of elements allocated to hold non-zero entries in the specified sparse array.

## ◆ mpsGetPi()

double * mpsGetPi | ( | const mpsArray * | mlArr | ) |

Access the imaginary data in an array of doubles.

Parameters

  mlArr | Pointer to an `mpsArray` of doubles.

Returns
  Pointer to the imaginary data elements of the array.

## ◆ mpsGetPr()

double * mpsGetPr | ( | const mpsArray * | mlArr | ) |

Access the real data in an array of doubles.

Parameters

  mlArr | Pointer to an `mpsArray` of doubles.

Returns
  Pointer to the first element of the real data.

## ◆ mpsGetScalar()

double mpsGetScalar | ( | const mpsArray * | mlArr | ) |

Determine the value of the first real element of an array.

Parameters

  mlArr | Pointer to an `mpsArray`.

Returns
  Pointer to the value of the first real element of the array.

## ◆ mpsGetString()

int mpsGetString | ( | const mpsArray * | mlArr,
|  | char * | str,
|  | mpsSize | len
| ) |  |

Copy the character data of a string array into a C-style string.

Parameters

  mlArr | Pointer to an `mpsArray` having the `mpsCHAR_CLASS` class.
  str | Starting location for the string. `mpsGetString` writes the character data into `str` and then terminates the string with a `NULL` character.
  len | Size, in bytes, of destination buffer pointed to by `str`.

Returns
  `0` on success or if `strlen == 0`, and `1` on failure.

## ◆ mpsInitialize()

mpsClientRuntime * mpsInitialize | ( | void |  | ) |

Set up the programming environment for MATLAB Production Server client based on version 1.0.

This global initialization should be done just once in the program. Invoking it multiple times will return the pointer to the same underlying API struct.

Returns
  A pointer to the MATLAB Production Server client API struct.

## ◆ mpsInitializeEx()

mpsClientRuntime * mpsInitializeEx | ( | int | version | ) |

Set up the programming environment for MATLAB Production Server client based on the version number provided by the user.

This function can only be used to access the versions above 1.0. To use version 1.0, please use `mpsInitialize()` function. This global initialization should be done just once in the program. Invoking it multiple times will return the pointer to the same underlying API struct.

Returns
  A pointer to the MATLAB Production Server client API struct corresponding to the version provided.

## ◆ mpsIsCell()

bool mpsIsCell | ( | const mpsArray * | mlArr | ) |

Determine whether input is cell array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array has the class `mxCELL_CLASS`, and false otherwise.

## ◆ mpsIsChar()

bool mpsIsChar | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents a string array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array has the class `mpsCHAR_CLASS`, and false otherwise.

## ◆ mpsIsClass()

bool mpsIsClass | ( | const mpsArray * | mlArr,
|  | const char * | classname
| ) |  |

Determine whether array is member of specified class.

Parameters

  mlArr | Pointer to an `mpsArray`
  classname | Array category you are testing. You can specify any one of the following
  predefined constants: Value of `classname` | Corresponding Class
  --- | ---
  `cell` | `mpsCELL_CLASS`
  `char` | `mpsCHAR_CLASS`
  `double` | `mpsDOUBLE_CLASS`
  `int8` | `mpsINT8_CLASS`
  `int16` | `mpsINT16_CLASS`
  `int32` | `mpsINT32_CLASS`
  `int64` | `mpsINT64_CLASS`
  `logical` | `mpsLOGICAL_CLASS`
  `single` | `mpsSINGLE_CLASS`
  `struct` | `mpsSTRUCT_CLASS`
  `uint8` | `mpsUINT8_CLASS`
  `uint16` | `mpsUINT16_CLASS`
  `uint32` | `mpsUINT32_CLASS`
  `uint64` | `mpsUINT64_CLASS`
  `<class_name>` | `<class_id>`

In the table, `<class_name>` represents the name of a specific MATLAB custom object. You can also specify one of your own class names.

Returns
  True if the array has the class `classname`, and false otherwise.

## ◆ mpsIsComplex()

bool mpsIsComplex | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` contains an imaginary part.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array contains an imaginary part, and false otherwise.

## ◆ mpsIsDouble()

bool mpsIsDouble | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as double-precision, floating-point numbers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array stores its data as double-precision, floating-point numbers, and false otherwise.

## ◆ mpsIsEmpty()

bool mpsIsEmpty | ( | const mpsArray * | mlArr | ) |

Determine whether array is empty.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array has no data, and false otherwise.

## ◆ mpsIsInt16()

bool mpsIsInt16 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as signed 16-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as signed 16-bit integers, and false otherwise.

## ◆ mpsIsInt32()

bool mpsIsInt32 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as signed 32-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as signed 32-bit integers, and false otherwise.

## ◆ mpsIsInt64()

bool mpsIsInt64 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as signed 64-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as signed 64-bit integers, and false otherwise.

## ◆ mpsIsInt8()

bool mpsIsInt8 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as signed 8-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as signed 8-bit integers, and false otherwise.

## ◆ mpsIsLogical()

bool mpsIsLogical | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as `mpsLogical`.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as `mpsLogical`, and false otherwise.

## ◆ mpsIsLogicalScalar()

bool mpsIsLogicalScalar | ( | const mpsArray * | mlArr | ) |

Determine whether MATLAB treats the scalar data in the `mpsArray` as logical or numerical.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as `mpsLogical` and has 1-by-1 dimensions, and false otherwise.

## ◆ mpsIsLogicalScalarTrue()

bool mpsIsLogicalScalarTrue | ( | const mpsArray * | mlArr | ) |

Determine whether scalar array is true.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the value of the array's logical, scalar element is true, and false otherwise.

## ◆ mpsIsNumeric()

bool mpsIsNumeric | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` contains numeric data.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array contains numeric data, and false otherwise.

## ◆ mpsIsSingle()

bool mpsIsSingle | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as single-precision, floating-point numbers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array stores its data as single-precision, floating-point numbers, and false otherwise.

## ◆ mpsIsSparse()

bool mpsIsSparse | ( | const mpsArray * | mlArr | ) |

Determine whether array is sparse.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array is sparse, and false otherwise.

## ◆ mpsIsStruct()

bool mpsIsStruct | ( | const mpsArray * | mlArr | ) |

Determine whether input is structure array.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as `mpsStruct`, and false otherwise.

## ◆ mpsIsUint16()

bool mpsIsUint16 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as unsigned 16-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as unsigned 16-bit integers, and false otherwise.

## ◆ mpsIsUint32()

bool mpsIsUint32 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as unsigned 32-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as unsigned 32-bit integers, and false otherwise.

## ◆ mpsIsUint64()

bool mpsIsUint64 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as unsigned 64-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as unsigned 64-bit integers, and false otherwise.

## ◆ mpsIsUint8()

bool mpsIsUint8 | ( | const mpsArray * | mlArr | ) |

Determine whether `mpsArray` represents data as unsigned 8-bit integers.

Parameters

  mlArr | Pointer to an `mpsArray`

Returns
  True if the array represents data as unsigned 8-bit integers, and false otherwise.

## ◆ mpsRemoveField()

void mpsRemoveField | ( | mpsArray * | mlArr,
|  | int | fieldnumber
| ) |  |

Delete a field from an array of struct.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  fieldnumber | Number of the field to delete.

## ◆ mpsSetCell()

void mpsSetCell | ( | mpsArray * | mlArr,
|  | mpsIndex | index,
|  | mpsArray * | value
| ) |  |

Set the contents of a cell array at a specified index.

Parameters

  mlArr | Pointer to an `mpsArray` cell array.
  index | Number of elements in the cell array between the first element and the desired one.
  value | Pointer to new value for the cell. You can put an `mpsArray` of any type into a cell. You can even put another cell `mpsArray` into a cell.

## ◆ mpsSetDimensions()

int mpsSetDimensions | ( | mpsArray * | mlArr,
|  | const mpsSize * | dims,
|  | mpsSize | ndim
| ) |  |

Modify number of dimensions and size of each dimension of an array.

Parameters

  mlArr | Pointer to an `mpsArray`
  dims | Dimensions array. Each element in the dimensions array contains the size of the array in that dimension.
  ndim | Number of dimensions.

Returns
  `0` on success, and `1` on failure.

## ◆ mpsSetField()

void mpsSetField | ( | mpsArray * | mlArr,
|  | mpsIndex | index,
|  | const char * | fieldname,
|  | mpsArray * | pvalue
| ) |  |

Set the value held in the specified element of the specified field of an array of struct.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  index | Index of the desired element.
  fieldname | Name of a field in the struct. The field must exist.
  pvalue | Pointer to an `mpsArray` containing the data you want to assign to `fieldname`.

## ◆ mpsSetFieldByNumber()

void mpsSetFieldByNumber | ( | mpsArray * | mlArr,
|  | mpsIndex | index,
|  | int | fieldnumber,
|  | mpsArray * | pvalue
| ) |  |

Set the value held in the specified field number at the indexed element of an array.

Parameters

  mlArr | Pointer to an `mpsArray` of struct.
  index | Index of the desired element.
  fieldnumber | Number of a field in the struct.
  pvalue | Pointer to the `mpsArray` containing the data to set.

## ◆ mpsSetM()

void mpsSetM | ( | mpsArray * | mlArr,
|  | mpsSize | m
| ) |  |

Set the first dimension of an array.

Parameters

  mlArr | Pointer to an `mpsArray`.
  m | First dimension of the array.

## ◆ mpsSetN()

void mpsSetN | ( | mpsArray * | mlArr,
|  | mpsSize | n
| ) |  |

Set the number of columns in an array.

Parameters

  mlArr | Pointer to an `mpsArray`.
  n | Number of columns in the array.

## ◆ mpsSetNzmax()

void mpsSetNzmax | ( | mpsArray * | mlArr,
|  | mpsSize | nzmax
| ) |  |

Set the maximum number of non-zero elements in a sparse array.

Parameters

  mlArr | Pointer to a sparse `mpsArray`.
  nzmax | Number of elements allocated to hold the arrays pointed to by `ir`, `pr`, and `pi`. Set `nzmax` greater than or equal to the number of non-zero elements in the array, but set it to be less than or equal to the number of rows times the number of columns. If you specify a value of `0`, the value of nzmax is automatically set to `1`.

## ◆ mpsTerminate()

void mpsTerminate | ( | void |  | ) |

Perform global clean up of resources consumed by MATLAB Production Server client environment.

This should be done just once in the application. Invoking it multiple times will have no effect.