ensemble.validateMatfile
Check that a .ens file is valid
Syntax
Description
Checks that the .ens file associated with an ensemble object is valid and matches the metadata stored in the ensemble object. Requires the .ens file to be a MAT file with X and stateVector fields that have matching sizes. Builds an ensembleMetadata object from the saved stateVector. If the ensemble object has an ensembleMetadata object, checks that the metadata built from the file matches the current metadata. Returns a matfile object for the file, as well as the ensembleMetadata object. Also returns the numeric precision of the saved ensemble.
= obj.validateMatfile(header)
Customize header in thrown error IDs
Input Arguments
header
string scalar
Header for thrown error IDs
Output Arguments
m
scalar matfile object
A matfile object for the .ens file
metadata
scalar ensembleMetadata object
The ensembleMetadata object for the ensemble object.
precision
‘single’ | ‘double’
The numeric precision of the saved ensemble