gdaGetIndex#

Purpose#

Gets the index of a variable in a GAUSS Data Archive.

Format#

ind = gdaGetIndex(filename, varname)#
Parameters:
  • filename (string) – name of data file.

  • varname (string) – name of variable in the GDA.

Returns:

ind (scalar) – index of variable in the GDA.

Examples#

ind = gdaGetIndex("myfile.gda", "observed");

Remarks#

If gdaGetIndex() fails, it will return a scalar error code. Call scalerr() to get the value of the error code. The error code may be any of the following:

1

Null file name.

2

File open error.

4

File read error.

5

Invalid file type.

8

Variable not found.

10

File contains no variables.

14

File too large to be read on current platform.

See also

Functions gdaGetName(), gdaReadByIndex()