| MATLAB Compiler | ![]() |
mwString GetFieldName(int index)
Return string representing name of the (zero-based) ith field in struct array.
C++ syntax
#include "mclcppclass.h" const char* fields[] = {"a", "b", "c"}; mwArray a(2, 2, 3, fields); const char* name = (const char*)a.GetFieldName(1); // Should // return "b"
Arguments
Index. zero-based field number.
Return value
mwString containing the fieldname.
Description
Use this method to determine the name of a given field in a struct array. If the underlying array is not of type struct, an exception is thrown.
| int NumberOfFields() const | mwArray GetDimensions() const | ![]() |
© 1994-2005 The MathWorks, Inc.