stateVector.coupleDimensions

Update state and ensemble dimensions of variables to match a template variable


Syntax



Description

[obj, failed, cause] = obj.coupleDimensions(t, vars, header)

Couples the dimensions of indicated variables to match a template variable. If unsuccessful, indicates that the operation failed and returns the cause of the failure.


Input Arguments

t

scalar, linear index
The index of the template variable

vars

vector, linear indices
The indices of the variables whose dimensions should be coupled to the template variable

Output Arguments

obj

scalar stateVector object
The state vector updated with the coupled dimensions or the original object if coupling failed.

failed

0 | scalar linear index
Set to 0 if the state vector updated successfully. If unsuccessful returns the index of the variable that failed

cause

scalar MException | []
The cause of the failed update, or an empty array if the coupling was successful.