ILNumerics Ultimate VSMatFile Constructor (InCell)ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
Create MatFile object from multiple arrays of arbitrary types. Automatically choose array names for saving.

[ILNumerics Core Module]

Namespace: ILNumerics
Assembly: ILNumerics.Core (in ILNumerics.Core.dll) Version: 5.3.0.0 (5.3.7131.2749)
Syntax

public MatFile(
	InCell input
)

Parameters

input
Type: ILNumericsInCell
Cell array holding the arrays to be added to the MatFile. The size of the cell is neglected. Elements are read in column major order.
Exceptions

ExceptionCondition
ArgumentExceptionIf input or any element in input is or points to null.
ArgumentNullExceptionIf input array was null or one of the arrays in the input arrays was null.
Remarks

[ILNumerics Core Module]

Examples

Array<sbyte> A = counter<sbyte>(-10, 2, 4, 8, 13);
Array<double> B = ones<double>(199, 200);

// MatFile should be used in an 'using' block, 
// cleaning up its resources automatically.
using (MatFile mat = new MatFile(cellv(A, B))) {
    mat.Write("file.mat");
}

// reading back using ILMath.loadArray<T>(...)
Array<sbyte> C = loadArray<sbyte>("file.mat", "Array0"); // names are automatic
Array<double> D = loadArray<double>("file.mat", "Array1");
Assert.IsTrue(C.Equals(A));
Assert.IsTrue(D.Equals(B));
See Also

Reference