Error Messages/40835

Error message

The value passed to the vector parameter, 'Set1', of function 'Union' has more than one dimension, 
so that it is ambiguous which index should be the vector dimension.


A parameter of the function you are calling is declared using the Vector qualifier, such as in this User-Defined Function declaration:

Function Union(Set1, Set2: Vector)

You then attempted to pass a 2-D (or >2-D) array as one of the parameters, e.g.:

Variable A -- {is indexed by I and J}
Variable C := Union(A, B)

Analytica issues this error because it is ambiguous which dimension you intend to be the "vector" dimension -- it might be I or it might be J. Hence, this is ambiguous.


You can "vectorize" your variable in the expression that calls the function. For example, suppose we intended the J dimension of A to be the vector dimension (and we'll assume B is already 1-D), you could do this:

Var AJ[J] := A Do Union(AJ, B)

This declares AJ to be dimensioned only by J when the call is made, so it is clear that Union should operate over the J dimension of A.

See Also


You are not allowed to post comments.