Wynn:
I believe this problem is occurring because you are using the index operator (brackets "[","]") instead of the functional call operator (parentheses "(",")") in your code to access the matrix.
SigCh1Vect[i] = SigCh1Max[1,i];
The index operator is not defined for the matrix, because the C++ language does not allow a two-argument overload of this operator. Instead you have to use the function call operator for matrices and remember to use the index operator for vectors.
I believe that what is happening is that the compiler is using one of the defined cast operators on the matrix (operator DataType) to convert the symbol "SigCh1Max" into a double pointer. It then interprets the bracket as it would any array index operation. So the compile
r effectively sees:
SigCh1Vect[i] = *(((Real64*)SigCh1Max) + (1,i));
In this case, I believe the comma operator is defined to return the rightmost operand, or "i". Changing your code to
SigCh1Vect[i] = SigCh1Max(1,i);
should fix the problem. Please let me know if any issues exist after this fix.
In the next release of Measurement Studio, I will recommend that the index operator be defined on the matrix classes, even if it simply throws an exception. The existence of this operator will prevent problems like this from showing up.
Hope this helps,
-- Chris W.
Measurement Studio R&D
National Instruments