LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

How do I determine array size in a formula node

Highlighted
I am feeding an array into a formula node to perform an operation on. However the size of the array can be an arbitrary size. How can I determine its size to use for iterating through a for loop?
 
I suppose that I could add another input that is fed with the array size from the array palate but I would like to know if it can be done inside the formula node itself.
0 Kudos
Message 1 of 4
(1,166 Views)

Your own advice is the only and best one.

 

greetings from the Netherlands
0 Kudos
Message 2 of 4
(1,148 Views)
Sometimes I scare myself. Smiley Surprised
0 Kudos
Message 3 of 4
(1,134 Views)

Hi,

 

Inside formula node you can use following code to find the array size.

 

variable=sizeOfDim(array_variable,0);

 

eg: n=sizeOfDim(a,0);

0 Kudos
Message 4 of 4
(470 Views)