MathWorks.MATLAB.NET.Arrays.MWNumericArray Class
Namespace: MathWorks.MATLAB.NET.Arrays
Managed representation of MATLAB numeric array types
Description
MWNumericArray
is the managed representation of the MATLAB numeric
array types. Like its MATLAB equivalent, it is the default array type used by most of the
MATLAB math functions.
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
This property is read-only.
Syntax
public virtual int[] Dimensions { get; }
Empty
— Return writeable version of empty MWNumericArray
MWNumericArray
FloatingPointAccuracy
— Return distance from 1.0 to next largest floating-point number
Double
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
Constructors
These methods specialize standard MATLAB operators and functions for objects in this class.
MWNumericArray() | Creates an empty double numeric array. |
MWNumericArray(Array) | Creates an m-by-n-by-p-by-... real double numeric array from a native rectangular array in row major order. The numeric array will have the same shape as the user specified data array. If the input array is a jagged array then creates an m-by-n-by-p-by-... numeric array of the same type as the element type of the jagged array. Throws if the jagged array does not have a rectangular shape. |
MWNumericArray(Byte) | Creates a double numeric scalar from a byte value. |
MWNumericArray(Double) | Constructs a double numeric scalar from a double value. |
MWNumericArray(Int16) | Creates a double numeric scalar from a short value. |
MWNumericArray(Int32) | Creates a double numeric scalar from an integer value. |
MWNumericArray(Int32[]) | Creates an m-by-n-by-p-by-... empty real, double numeric array initialized to zeros. |
MWNumericArray(Int64) | Creates a double numeric scalar from a long value. |
MWNumericArray(Single) | Creates a MATLAB double numeric scalar from a float value. |
MWNumericArray(MWNumericType) | Creates an empty numeric array of the specified type. |
MWNumericArray(Array, Array) | Creates an m-by-n-by-p-by-... complex numeric array from a real and imaginary native array in row major order. The numeric array will have the same shape as the user specified data arrays. |
MWNumericArray(Byte, Boolean) | Creates an uint8 numeric scalar from a byte value. |
MWNumericArray(Byte, Byte) | Creates a complex double numeric scalar from a real and imaginary byte value. |
MWNumericArray(Double, Double) | Constructs a complex double numeric scalar from a real and imaginary double value. |
MWNumericArray(Int16, Boolean) | Creates an int16 numeric scalar from a short value. |
MWNumericArray(Int16, Int16) | Creates a complex double numeric scalar from a real and imaginary short value. |
MWNumericArray(Int32, Boolean) | Creates an int32 numeric scalar from an integer value. |
MWNumericArray(Int32, Int32) | Creates a complex double numeric scalar from a real and imaginary integer value. |
MWNumericArray(Int64, Boolean) | Creates an int64 numeric scalar from a long value. |
MWNumericArray(Int64, Int64) | Creates a complex double numeric scalar from a real and imaginary long value. |
MWNumericArray(SerializationInfo, StreamingContext) | Internal deserialization constructor. |
MWNumericArray(Single, Boolean) | Creates a floating point numeric scalar from a float value. |
MWNumericArray(Single, Single) | Creates a complex double numeric scalar from a real and imaginary float value. |
MWNumericArray(MWArrayComplexity,Int32[]) | Creates an m-by-n-by-p-by-... empty double numeric array initialized to zeros. |
MWNumericArray(Array, Boolean, Boolean) | Creates an m-by-n-by-p-by-... real numeric array from a native array in row major order. The numeric array will have the same shape as the user specified data array. |
MWNumericArray(Byte, Byte, Boolean) | Creates a complex uint8 numeric scalar from a real and imaginary byte value. |
MWNumericArray(Int16, Int16, Boolean) | Creates a complex int16 numeric scalar from a real and imaginary short value. |
MWNumericArray(Int32, Int32, Boolean) | Constructs a complex int32 numeric scalar from a real and imaginary integer value. |
MWNumericArray(Int32, Int32,Byte[]) | Creates an m-by-n double array from a native vector of byte values in row major order. |
MWNumericArray(Int32, Int32,Double[]) | Creates an m-by-n double array from a native vector of double values in row major order. |
MWNumericArray(Int32, Int32,Int16[]) | Creates an m-by-n double array from a native vector of short values in row major order. |
MWNumericArray(Int32, Int32,Int32[]) | Creates an m-by-n double array from a native vector of integer values in row major order. |
MWNumericArray(Int32, Int32,Int64[]) | Creates an m-by-n double array from a native vector of long values in row major order. |
MWNumericArray(Int32, Int32,Single[]) | Creates an m-by-n double array from a native vector of floating point values in row major order. |
MWNumericArray(Int64, Int64, Boolean) | Creates a complex int64 numeric scalar from a real and imaginary long value. |
MWNumericArray(Single, Single, Boolean) | Creates a complex floating point numeric scalar from a real and imaginary float value. |
MWNumericArray(MWArrayComplexity,
MWNumericType,Int32[]) | Creates an m-by-n-by-p-by-... empty numeric array initialized to zeros. |
MWNumericArray(Array, Array, Boolean, Boolean) | Creates an m-by-n-by-p-by-... complex numeric array of the specified type from a real and imaginary native array in row major order. The numeric array will have the same shape as the user specified data arrays. |
MWNumericArray(Int32, Int32,Byte[],Byte[]) | Creates an m-by-n complex double array from a real and imaginary vector of byte values in row major order. |
MWNumericArray(Int32, Int32,Double[], Boolean) | Creates an m-by-n double array from a native vector of double values. |
MWNumericArray(Int32, Int32,Double[],Double[]) | Creates an m-by-n complex double array from a real and imaginary vector of double values in row major order. |
MWNumericArray(Int32, Int32,Int16[],Int16[]) | Creates an m-by-n complex double array from a real and imaginary vector of short values in row major order. |
MWNumericArray(Int32, Int32,Int32[],Int32[]) | Creates an m-by-n complex double array from a real and imaginary vector of integer values in row major order. |
MWNumericArray(Int32, Int32,Int64[],Int64[]) | Creates an m-by-n complex double array from a real and imaginary vector of long values in row major order. |
MWNumericArray(Int32, Int32,Single[],Single[]) | Creates an m-by-n complex double array from a real and imaginary vector of floating point values in row major order. |
MWNumericArray(Int32, Int32,Byte[], Boolean,
Boolean) | Creates an m-by-n uint8 array from a native vector of byte values. |
MWNumericArray(Int32, Int32,Double[],Double[],
Boolean) | Creates an m-by-n complex double array from a native vector of double values. |
MWNumericArray(Int32, Int32,Int16[], Boolean,
Boolean) | Creates an m-by-n int16 array from a native vector of short values. |
MWNumericArray(Int32, Int32,Int32[], Boolean,
Boolean) | Creates an m-by-n int32 array from a native vector of integer values. |
MWNumericArray(Int32, Int32,Int64[], Boolean,
Boolean) | Creates an m-by-n int64 array from a native vector of long values. |
MWNumericArray(Int32, Int32,Single[], Boolean,
Boolean) | Constructs an m-by-n floating point array from a native vector of floating point values. |
MWNumericArray(Int32, Int32,Byte[],Byte[], Boolean,
Boolean) | Creates an m-by-n complex uint8 array from a native vector of byte values. |
MWNumericArray(Int32, Int32,Int16[],Int16[], Boolean,
Boolean) | Creates an m-by-n complex int16 array from a native vector of short values. |
MWNumericArray(Int32, Int32,Int32[],Int32[], Boolean,
Boolean) | Creates an m-by-n complex int32 array from a native vector of integer values. |
MWNumericArray(Int32, Int32,Int64[],Int64[], Boolean,
Boolean) | Creates an m-by-n complex int64 array from a native vector of long values. |
MWNumericArray(Int32, Int32,Single[],Single[], Boolean,
Boolean) | Creates an m-by-n complex floating point array from a native vector of floating point values. |
Public Methods
array_handle_imag | Internal function |
array_handle_real | Internal function |
Clone | Syntax publicvirtualObjectClone() Makes
a deep copy of an |
ConvertToNativeTypes | Syntax publicstaticObject[] ConvertToNativeTypes( MWArray[] src, Type[] specifiedTypes ) Converts an array of |
Dispose() | Syntax publicvoidDispose() Releases
resources of the |
Dispose(Boolean) | Syntax protected override void Dispose( bool disposing )
Internal dispose function |
Equals | Syntax publicoverrideboolEquals(
Objectobj
) Compares two |
Finalize | Inherited from |
GetHashCode | Syntax publicoverrideintGetHashCode() Returns
the hashcode of the |
GetObjectData | Syntax publicvirtualvoidGetObjectData( SerializationInfoinfo, StreamingContextcontext )
Implements ISerializable.GetObjectData(SerializationInfo, StreamingContext) Serialization function. The arguments for this function are supplied by the .NET serialization infrastructure. |
GetType | Inherited from |
MakeSparse(Int32[], Int32[], Double[]) | Constructs a real sparse numeric matrix with the number of rows= max{rowIndex(k)} and the number of columns= max{colIndex(k)}. It initializes the array with the supplied data. The maximum number of nonzero elements is equal to the length of the data array. |
MakeSparse(Int32,Int32,MWArrayComplexity, Int32) | Constructs an empty sparse numeric matrix with the specified number of rows and columns and storage for the specified number of non-zero elements. |
MakeSparse(Int32[], Int32[],Double[],Double[]) | Constructs a complex sparse numeric matrix with the number of rows= max{rowIndex(k)} and the number of columns= max{colIndex(k)}. It initializes the array with the supplied data. The maximum number of nonzero elements is equal to the length of the data arrays. |
MakeSparse(Int32, Int32,Int32[],Int32[],Double[]) | Constructs a real sparse, numeric matrix with the specified number of rows and columns. It initializes the array with the supplied data. |
MakeSparse(Int32, Int32, Int32[], Int32[], Double[],
Double[]) | Constructs a complex sparse, numeric matrix with the specified number of rows and columns. It initializes the array with the supplied data. |
MakeSparse(Int32, Int32, Int32[],Int32[],Double[],
Int32) | Constructs a real sparse, numeric matrix with the specified number of rows and columns and maximum nonzero elements. It initializes the array with the supplied data. |
MakeSparse(Int32, Int32,Int32[],Int32[],Double[], Double[],
Int32) | Constructs a complex sparse, numeric matrix with the specified number of rows and columns and maximum nonzero elements. It initializes the array with the supplied data. |
MemberwiseClone | Inherited from |
ToArray | Syntax public virtual Array ToArray() 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,
|
ToArray(MWArrayComponent) | Syntax public Array ToArray(
MWArrayComponentcomponent
)
Return Value Type: Array A MATLAB numeric array containing the requested component of the numeric array This method returns a copy of the array component in column major order. The type of the array elements is determined by the data type of the numeric array. |
ToEmptyVector | Returns the empty MATLAB numeric vector as an appropriately typed native array. |
ToScalarByte | Converts the MATLAB uint8 numeric scalar to a byte value |
ToScalarDouble | Converts the MATLAB double numeric scalar to a double value. |
ToScalarFloat | Converts the MATLAB single numeric scalar to a floating point value. |
ToScalarInteger | Converts the MATLAB int32 numeric scalar to an integer value. |
ToScalarLong | Converts the MATLAB int64 numeric scalar to a long value. |
ToScalarShort | Converts the MATLAB int16 numeric scalar to a short value. |
ToString | Syntax public virtual string ToString() Returns
a formatted string representing the contents of the
|
ToVector | Syntax public Array ToVector( MWArrayComponent component )
Return Value Type: Array A MATLAB numeric array containing the requested component of the numeric array Returns the requested (real/imaginary) component of a MATLAB numeric array as a native array. This method returns a copy of the array component in column major order. The type of the array elements is determined by the data type of the numeric array. |
Specialized Operators and Functions
These methods specialize standard MATLAB operators and functions for objects in this class.
Explicit(MWNumericArray to Byte) | Implicit cast from a MATLAB uint8 numeric scalar to a byte value. |
Explicit(MWNumericArray to Int16) | Implicit cast from a MATLAB Int16 numeric scalar to a short value. |
Explicit(MWNumericArray to Int32) | Implicit cast from a MATLAB Int32 numeric scalar to an integer value. |
Explicit(MWNumericArray to Int64) | Implicit cast from a MATLAB Int64 numeric scalar to a long value. |
Explicit(MWNumericArray to Single) | Implicit cast from a MATLAB single numeric scalar to a floating point value. |
Explicit(MWNumericArray to Double) | Implicit cast from a MATLAB double numeric scalar to a double value. |
Implicit(Array to MWNumericArray) | Implicit cast from a generic native array to a MATLAB numeric array of the same numeric type. |
Implicit(Byte to MWNumericArray) | Implicit cast from a native byte value to a MATLAB uint8 numeric scalar. |
Implicit(Byte[] to MWNumericArray) | Implicit cast from a one dimensional native array of byte values to a MATLAB uint8 real numeric array. |
Implicit(Double to MWNumericArray) | Implicit cast from a native double scalar to a MATLAB double numeric scalar. |
Implicit(Double[] to MWNumericArray) | Implicit cast from a one dimensional native array of double values to a MATLAB double real numeric array. |
Implicit(Int16 to MWNumericArray) | Implicit cast from a native short value to a MATLAB int16 numeric scalar. |
Implicit(Int16[] to MWNumericArray) | Implicit cast from a one dimensional native array of short values to a MATLAB Int16 real numeric array. |
Implicit(Int32 to MWNumericArray) | Implicit cast from a native integer scalar to a MATLAB double numeric scalar. |
Implicit(Int32[] to MWNumericArray) | Implicit cast from a one dimensional native array of integer values to a MATLAB double real numeric array. |
Implicit(Int64 to MWNumericArray) | Implicit cast from a native long scalar to a MATLAB Int64 numeric scalar. |
Implicit(Int64[] to MWNumericArray) | Implicit cast from a one dimensional native array of long values to a MATLAB Int64 real numeric array. |
Implicit(Single to MWNumericArray) | Implicit cast from a native floating point scalar to a MATLAB single numeric scalar. |
Implicit(Single[] to MWNumericArray) | Implicit cast from a one dimensional native array of floating point values to a MATLAB single real numeric array. |
Fields
Inf | A MATLAB numeric array constant representing infinity. |
NaN | MATLAB numeric array constant representing a non-number. |
Inheritance Hierarchy
System.Object
Mathworks.MATLAB.NET.Arrays.MWArray
Mathworks.MATLAB.NET.Arrays.MWIndexArray
Mathworks.MATLAB.NET.Arrays.MWLogicalArray
Mathworks.MATLAB.NET.Arrays.MWNumericArray
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)