LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about Index Array function

I want to find multiple values from an array (the index of Index Array is an array). But it seems the index can only be integer. How to solve this? Thanks!

0 Kudos
Message 1 of 4
(2,784 Views)

Please see attached snippet, it is one of the way to do it.

With Regards

Miraz
Kudos is better option to thank somebody on this forum
------------------------------------------------------------------------------
Message 2 of 4
(2,782 Views)

When you get a programming challenge, don't start by trying to find a way to break the tool you have.  That's what happens when you try to feed it something it doesn't understand.

 

Instead, think of how you can use that tool to help you.  The snippet is probably the easiest way to handle what you're asking unless the elements you want from the array are all consecutive.  If you can't make that assumption though, all you needed to do was find a way to call the index function multiple times. 

Message 3 of 4
(2,768 Views)

Yes, a list of N items can only be indexed by an integer number, as you'll point outside the list otherwise. That's kind of the definition. What you might be after is the interpolate 1D array, if you want to guess what a number in between to list items would be.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(2,727 Views)