The jsmat.variable package contains variables of different types. Variables can be added to a .mat file.

{@link ch.javasoft.jsmat.variable.MatAllocated MatAllocated} and {@link ch.javasoft.jsmat.variable.MatReserved MatReserved} variables exist, the former for data which is already allocated in memory, the latter for variables with huge amounts of data. When a reserved variable is constructed, only the size must be known. The data is then appended step by step — depending on the underlying function generating the data.

For allocated variables, the static methods of {@link ch.javasoft.jsmat.variable.MatMatrix MatMatrix} can be used to create matrices for different number types. For complex allocated types such as structs, the {@link ch.javasoft.jsmat.variable.MatStructure MatStructure} variable can be used.

Similarly, for reserved variables, the static methods of {@link ch.javasoft.jsmat.variable.MatReservedMatrix MatReservedMatrix} can be used to create matrices for different number types. For complex reserved types, the {@link ch.javasoft.jsmat.variable.MatReservedStructure MatReservedStructure} is available.