LoadBinary

Declaration: TMat4D.LoadBinary (FName: string; TSlotStart, TSlotEnd: integer): integer;
The method LoadBinary loads the binary data file FName starting with the time slot TSlotStart up to TSlotEnd. The hypercube matrix is resized accordingly.

If any of the time slot parameters TSlotStart and TSlotEnd is zero or negative, the entire data file is read into the matrix. If TSlotStart is within the data range but TSlotEnd is beyond the maximum time slot, only the available data are read (the size of the matrix is reduced accordingly).

The function returns the following error codes:

 0 ... everything is OK
-1 ... unexpected type of variable
-2 ... binary matrix file is not a 4D matrix
-3 ... not enough memory, matrix is too big
-4 ... TSlotStart is beyond the maximum time slot
-5 ... file FName does not exist