stateVector.relocate

Update paths to the .grid files associated with state vector variables


Syntax



Description

obj = obj.relocate(-1, …)
obj = obj.relocate(v, …)
obj = obj.relocate(variableNames, …)

Updates the .grid files associated with specified variables to a new set of .grid files. If the first input is -1, updates all the variables in the state vector.

obj = obj.relocate(variables, gridPaths)
obj = obj.relocate(variables, gridObjects)

Specify the new .grid files using either file paths or gridfile objects.


Input Arguments

v

logical vector | linear indices [nVariables] | -1
The indices of variables in the state vector whose .grid files should be updated. Either a logical vector with one element per state vector variable, or a vector of linear indices. If linear indices, may not contain repeated values. If -1, selects all the variables in the state vector.

variableNames

string vector [nVariables]
The names of variables in the state vector whose .grid files should be updated. May not contain repeat variable names.

gridPaths

string, scalar | vector [nVariables]
File paths to the new

.grid files. If scalar, uses the same .grid file path for all input variables. If a vector, must have one element per listed variable.

gridObjects

gridfile object, scalar | vector [nVariables]
Gridfile objects for the new .grid files. If scalar, uses the same gridfile object for all input variables. If a vector, must have one element per listed variable.

Output Arguments

obj

scalar stateVector object
The stateVector with updated .grid files