gridfile.validRange

Specify a valid range for data catalogued in a .grid file


Syntax



Description

range = obj.validRange
range = obj.validRange(‘default’)

Return the default valid range for a gridfile.

sourceRanges = obj.validRange(‘sources’)
sourceRanges = obj.validRange(‘sources’, s)
sourceRanges = obj.validRange(‘sources’, sourceNames)

Return the valid ranges for the specified data sources. If no data sources are specified, returns the valid range for all data sources in the gridfile.

obj.validRange(range)

Specify a valid range for data catalogued in a .grid file. Data outside of the valid range are converted to NaN when loaded. This syntax sets the valid range for all data sources currently in the gridfile, and applies the valid range any data sources added to the .grid file in the future.

obj.validRange(range, s)
obj.validRange(range, sourceNames)

Implements a valid range for the specified data sources. Overrides any valid range values previously applied to the data sources.


Input Arguments

range

numeric vector [2]
The valid range. The first element is the lower bound, and the second element is the upper bound. Data values outside this (open) interval are converted to NaN when loaded.

s

logical vector [nSources] | vector, linear indices
The indices of the data sources that should be assigned the valid range.

sourceName

string vector
The names of the data sources that should be assigned a valid range.

Output Arguments

range

numeric vector [2]
The default valid range for the gridfile

sourceRanges

numeric matrix [nSource, 2]
The valid ranges for the specified data sources