MathWorks.MATLAB.NET.Arrays.native.MWStructArray Class
Namespace: MathWorks.MATLAB.NET.Arrays.native
Managed representation of MATLAB structure array
Description
MWStructArray
is the managed representation of the MATLAB structure
array. Like its MATLAB equivalent, it consists of field values associated with field
names.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Namespace:
MathWorks.MATLAB.NET.Arrays.native
Assembly: MWArray (in MWArray.dll) Version: 2.23.1.0 (2.23.1.0)
Syntax:
[SerializableAttribute] public class MWStructArray : MWArray, ICloneable, IEquatable<MWStructArray>
Properties
Public Properties
ArrayType
— Derived type of MWArray
MWArrayType
This property is read-only.
Syntax
public MWArrayType ArrayType { get; }
MWArray
(Inherited
from MWArray
.)
Dimensions
— Return native integer array containing size of each dimension of MWArray
positive integer
This property is read-only.
Syntax
public virtual int[] Dimensions { get; }
Read only property returning a native integer array containing the size of each
dimension of the MWArray
.(Inherited from
MWArray
.)
See size
.
Empty
— Return writeable version of empty MWCellArray
positive integer
This property is read-only.
Syntax
public virtual int[] Dimensions { get; }
Read only property returning a native integer array containing the size of each
dimension of the MWArray
.(Inherited from
MWArray
.)
See size
.
FieldNames
— Return field names of MATLAB structure array as native array of strings
boolean
This property is read-only.
Syntax
publicstring[] FieldNames { get; }
IsCellArray
— Flag indicating if MWArray
is MWCellArray
boolean
IsCharArray
— Flag indicating if MWArray
is MWCharArray
boolean
IsEmpty
— Flag indicating if MWArray
is empty
boolean
IsLogicalArray
— Flag indicating if MWArray
is MWLogicalArray
boolean
IsNumericArray
— Flag indicating if MWArray
is MWNumericArray
boolean
IsStructArray
— Flag indicating if MWArray
is MWStructArray
boolean
Item
— Generic MATLAB indexer returning result as MWArray
MWArray
Syntax
public MWArray this[
params int[] indices
] { get; set; }
Array indexing in this API, as in MATLAB®, is one-based rather than zero-based.
NumberOfDimensions
— Number of dimensions in MWArray
positive integer
NumberOfElements
— Number of elements in MWArray
positive integer
This property is read-only.
Syntax
public int NumberOfElements { get; protected get}
prod(size(A))
for non-empty arrays. See numel
.
NumberOfFields
— Number of fields in MATLAB structure array
positive integer
This property is read-only.
Syntax
public int NumberOfElements { get; protected get}
Methods
Public Methods
Clone | Syntax public virtual Object Clone() Makes
a deep copy of an See the "=" operator in the MATLAB documentation. |
createAxisWeightArray | Syntax protected void createAxisWeightArray() |
deepCopy | Syntax protected void deepCopy(
MWArraytarget
) Parameters target
Type: |
Equals | Syntax public override bool Equals(
Objectobj
) Compares two Parameters obj
Type: An Return Value Type: true if the arrays are equal. |
Finalize | (Inherited from Object) |
get | Syntax protected Object get(
int[] index
) Parameters index Type: Return Value Type:
|
getDimsStr | Inherited from |
GetField(String) | Syntax publicObjectGetField(
stringfieldName
) Parameters fieldName Type: The field name. Return Value Type: The contents of the specified field. Returns the contents of the specified field in the structure array. |
GetField(String, Int32) | Syntax public Object GetField( stringfieldName, intindex ) Parameters fieldName Type: The field name. index Type: The index for an array of structures. Return Value Type: The contents of the specified field. Returns the contents of the specified field in the specified structure of an array of structures. |
GetHashCode | Syntax public override int GetHashCode() Return Value Type:
The hashcode for the
|
getOneBasedIndexForArray | Syntax protected int getOneBasedIndexForArray(
int[] index
) Parameters index Type:
Return Value Type: |
GetType | Inherited from |
initNativeArray | Syntax protected void initNativeArray(
intnum
) Parameters num
Type: |
IsField | Syntax public bool IsField(
stringfieldName
) Parameters fieldName Type: The field name. Return Value Type: Returns true if the specified field is the name of a field in the structure array. |
MemberwiseClone | Inherited from |
RemoveField | Syntax public MWStructArray RemoveField(
stringfName
) Parameters
Type: Return Value Type:
The new Structure Array. |
resizeFlatArray | Syntax protected void resizeFlatArray(
intnewSize
) Parameters newSize Type: |
set(Int32,Object) | Syntax protected void set( intindex, Objectval ) Parameters index Type: val Type: |
set(Int32[],Object) | Syntax protected void set( int[] index, Objectval ) Parameters index Type: val Type: |
setDims | Syntax protected void setDims(
int[] inDims
) Parameters inDims Type: |
setField | Syntax public void SetField( stringfieldName, ObjectfieldValue ) Parameters fieldName Type: The name of the field. fieldValue Type: The field value. |
setFlatArr | Syntax protected void setFlatArr(
Object[] newArr
) Parameters newArr Type: |
setNumOfElem | Syntax protected void setFlatArr(
Object[] newArr
) Parameters inDims Type: |
ToString | Syntax public override string ToString() Return Value Type:
The formatted Returns a formatted string representing the contents of the
|
Constructors
MWStructArray() | Creates an empty MATLAB structure array. |
MWStructArray(Object[]) | Creates a MATLAB structure array from the field name values pairs specified in a MATLAB array. |
MWStructArray(Int32[], String[]) | Creates a MATLAB structure array with the specified dimensions and field names. |
MWStructArray(Int32,Int32, String[]) | Creates a MATLAB structure array with the specified dimensions and field names. |
Inheritance Hierarchy
System.Object
Mathworks.MATLAB.NET.Arrays.native.MWArray
Mathworks.MATLAB.NET.Arrays.native.MWCellArray
Mathworks.MATLAB.NET.Arrays.native.MWStructArray
Version History
Introduced in R2006a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)