dash.stateVectorVariable.validateGrid

Check that a gridfile object matches a variable’s recorded gridfile parameters


Syntax



Description

[isvalid, cause] = obj.validateGrid(grid)

Checks that a gridfile object matches the gridfile parameters recorded for a state vector variable. If the object does not match the parameters, returns false and the cause of the mismatch as an MException. If the object matches, returns true and an empty array.

[isvalid, cause] = obj.validateGrid(grid, header)

Customize the header of returned MExceptions.


Input Arguments

grid

scalar gridfile object
The gridfile object being compared to the variable’s recorded gridfile parameters.

Output Arguments

isvalid

scalar logical
True is the gridfile object matches the recorded values. False if not.

cause

[] | scalar MException
If the gridfile does not match the recorded values, an MException reporting the cause of the mismatch. If the grid matches recorded values, an empty array.