Hello,
Which version of LabVIEW are you using? Are you possibly getting two error codes? Error -90026 is simply that the indices must be real, positive integers. If you are also getting an error about the size of the matrices being incompatible, try your code in the MathScript Window. What does
location(1)
return? A scalar value? Or an array?
What is the left-hand side of that expression? That is, are you assigning the output to a variable or a submatrix?
A = Phase(location(1));
or
A(c:d) = Phase(location(1));
What is output when you type
location(1)
Is it an integer value greater than 0? Or is it a double number? If you compute the location array in some manner, it may be that due to roundoff error, you don't end up with exactly an integer. The indexing routines will complain about this. You can truncate to integers with the int32 function. Try these suggestions. If you still have problems, post more of your code so we can reproduce the problem you see.
Grant M.
Staff Software Engineer | LabVIEW Math & Signal Processing | National Instruments