ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mathscript Array

Hello,

 

I wanna use the counter in my While Loop to acces the values of my vector/array inside the Mathscript. However, I get this message error:

 

 

"Error -90026 occurred at Error in function V at line 1:  The indexes for a matrix indexing operation must be real, positive integers."

Also, the counter is an integer, so I don't have a clueof what is the problem. I will attach my VI so I can make myself more clear. Thanks in advanced.

 

Yours sincerly,

 

Guilherme Garber

0 Kudos
Message 1 of 2
(3,175 Views)

Hello,

 

The issue lies in the fact that LabVIEW uses 0-based indexing for arrays and MathScript uses 1-based indexing. The integer counter you reference is indeed an integer, but it starts at 0. Since 0 is not a positive integer (and also out of bounds for array indexing in MathScript), you see the error message.

 

Grant M.
Senior Software Engineer | LabVIEW Tablets | National Instruments

0 Kudos
Message 2 of 2
(3,147 Views)