C and Fortran API Reference - The MathWorks - #151

/ 263


catalogue search
P. 151
P. 152
P. 153
P. 154
P. 155
P. 156
P. 157
P. 158
P. 159
P. 160
P. 161
P. 162
P. 163
P. 164
P. 165
P. 166
P. 167
P. 168
P. 169
P. 170
P. 171
P. 172
P. 173
P. 174
P. 175
P. 176
P. 177
P. 178
P. 179
P. 180
P. 181
P. 182
P. 183
P. 184
P. 185
P. 186
P. 187
P. 188
P. 189
P. 190
P. 191
P. 192
P. 193
P. 194
P. 195
P. 196
P. 197
P. 198
P. 199
P. 200


See other catalogues for The MathWorks

Text version of the page
mxCreateStructMatrix (C and Fortran)
Purpose CSyntax
Create unpopulated 2-D structure mxArray #include "matrix.h"
mxArray *mxCreateStructMatrix(mwSize m, mwSize n, int nfields, const char **fieldnames);
mwPointer mxCreateStructMatrix(m, n, nfields, fieldnames)
mwSize m, n
integer*4 nfields
character*(*) fieldnames(nfields)
Fortran Syntax
Arguments
m
The desired number of rows. This must be a positive integer.
n
The desired number ofcolumns. This must be a positive integer. nfields
The desired number of fields in each element.
fieldnames
The desired list of field names.
Each structure field name must begin with a letter and is case sensitive. The rest of the name may contain letters, numerals, and underscore characters. Use the namelengthmax function to determine the maximum length of a field name.
Returns A pointer to the created structure mxArray if successful, and NULL in C
(0 in Fortran) otherwise. The most likely cause of failure is insufficient heapspacetoholdthereturnedmxArray.
Description mxCreateStructMatrix and mxCreateStructArray are almost
identical. The only difference is that mxCreateStructMatrix can create only two-dimensional mxArrays,whilemxCreateStructArray can create mxArrays having two or more dimensions.
2-133

pageCatalog pdf di En 2012-06-22-01