MathWorks.MATLAB.NET.Arrays.MWCharArray Class
Namespace: MathWorks.MATLAB.NET.Arrays
Managed representation of MATLAB character array
Description
MWCharArray
derives from MWArray
and is the managed
representation of the MATLAB character array. Like its MATLAB equivalent,
MWCharArray
provides support for string creation and manipulation.
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.
Properties
Public Properties
ArrayType
— Derived type of MWArray
MWArrayType
This property is read-only.
Syntax
public MWArrayType ArrayType { get; }
MWArrayType
object.
Dimensions
— Return native integer array containing size of each dimension of MWArray
positive integer
Empty
— Return writeable version of empty MWCharArray
MWCharArray
This property is read-only.
Syntax
public static MWCharArray Empty { get; }
Read only property returning a native integer array containing the size of each
dimension of the MWArray
.(Inherited from
MWArray
.)
See size
.
IsCellArray
— Flag indicating if MWArray
is MWCellArray
boolean
IsCharArray
— Flag indicating if MWArray
is MWCharArray
boolean
IsDisposed
— Handle status of encapsulated MWArray
boolean
This property is read-only.
Syntax
public virtual bool IsDisposed { get; }
IsEmpty
— Flag indicating if MWArray
is empty
boolean
IsLogicalArray
— Flag indicating if MWArray
is MWLogicalArray
boolean
IsNumericArray
— Flag indicating if MWArray
is MWNumericArray
boolean
IsStringArray
— Flag indicating if MWArray
is MWStringArray
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.
NativeGCBlockSize
— Unmanaged memory block size in bytes
positive integer
This property is read-only.
Syntax
public static long NativeGCBlockSize { get; }
NativeGCEnabled
— Native array GC enabled flag
boolean
Syntax
public static bool NativeGCEnabled { get; set; }
MWArray
class or one of its
derived types that are no longer being referenced. This includes unmanaged memory
allocated through explicit creation of MWArray
types, as well as
implicit instantiation of an MWArray
via an implicit cast.
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; }
prod(size(A))
for non-empty arrays. See numel
.
Methods
Public Methods
Clone | Syntax public virtual ObjectClone() Makes
a deep copy of an |
Dispose() | Syntax public void Dispose() Releases
resources of the |
Equals | Syntax public override bool Equals(
Objectobj
) Compares two |
Finalize | Inherited from |
GetHashCode | Syntax public override int GetHashCode() Returns
the hashcode of the |
GetObjectData | Syntax public virtual void GetObjectData( SerializationInfo info, StreamingContext context )
Implements ISerializable.GetObjectData(SerializationInfo, StreamingContext) Serialization function. The arguments for this function are supplied by the .NET serialization infrastructure. |
GetType | Inherited from |
MemberwiseClone | Inherited from |
ToArray | Syntax public virtual ArrayToArray() Returns
a native .NET array containing a copy of data in the underlying MATLAB array. The
returned array has the same dimensionality as the underlying MATLAB array. The
elements of the returned array are converted according to default conversion
rules. If the underlying MATLAB array is a complex numeric type,
|
ToString | Syntax public virtual ArrayToString() Returns
a formatted string representing the contents of the
|
ToStringArrayIfIs2DArray | Syntax public string[] ToStringArrayIfIs2DArray() Return Value Type: String[] .NET string array Convert a 2D MWCharArray to .NET string array using a function that does not require conversion of ASCII to/from UTF16 to improve performance. |
Specialized Operators and Functions
These methods specialize standard MATLAB operators and functions for objects in this class.
Explicit(MWCharArray to Char | Syntax public static explicit operator char ( MWCharArray scalar ) Explicit cast from a MATLAB MWCharArray scalar to a native character value. Parameters stringArray Type: System.Array |
Implicit(String to MWCharArray) | Syntax public static implicit operator MWCharArray ( string value ) Implicit cast from a native string to a MATLAB character array. Parameters value Type: System.String The native string. Return Value Type: An
The native string. |
Constructors
These methods specialize standard MATLAB operators and functions for objects in this class.
MWCharArray() | Syntax public MWCharArray() Default constructor - creates an empty character array |
MWCharArray(Array) | Syntax public MWCharArray( Array stringArray ) Constructs an m-by-n-by-p-by-... character array from a native array of string values. Parameters stringArray Type: System.Array The native string array. The character array will have the same dimensions as the native string array. |
MWCharArray(Char) | Syntax public MWCharArray( char value ) Constructs a character array from a native character. Parameters value Type: System.Char The native character. |
MWCharArray(Char[]) | Syntax public MWCharArray( char[] value ) Constructs a character array from a native character array. Parameters value Type: System.Char The native character array. |
MWCharArray(Int32[]) | Syntax public MWCharArray( params int[] dimensions ) Creates an empty character array with the specified dimensions. Parameters dimensions Type: System.Int32[] An integer array containing the dimensions for the character array. If only one dimension is specified, an empty n-by-n character array is created. |
MWCharArray(String) | Syntax public MWCharArray( string value ) Constructs a character array from a native string. Parameters value Type: System.String The native string. |
MWCharArray(String[]) | Syntax public MWCharArray( string[] strings ) Constructs a character array from a native string array. Parameters value Type: System.String[] The native array of string arguments. |
MWCharArray(SerializationInfo, StreamingContext) | Syntax protected MWCharArray( SerializationInfo serializationInfo, StreamingContext context ) Internal deserialization constructor. Parameters serializationInfo Type: System.Runtime.Serialization.SerializationInfo Holds the data needed to serialize or deserialize the object. context Type: System.Runtime.Serialization.StreamingContext Describes the source and destination of the serialized stream The arguments for this constructor are supplied by the .NET serialization infrastructure. |
Inheritance Hierarchy
System.Object
Mathworks.MATLAB.NET.Arrays.MWArray
Mathworks.MATLAB.NET.Arrays.MWCellArray
Mathworks.MATLAB.NET.Arrays.MWCharArray
Mathworks.MATLAB.NET.Arrays.MWIndexArray
Mathworks.MATLAB.NET.Arrays.MWObjectArray
Mathworks.MATLAB.NET.Arrays.MWStringArray
Mathworks.MATLAB.NET.Arrays.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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)