LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search Ordered Table VI

Dear All, 

I am using the tool  '' Search Ordered Table VI '' which is shown in the attached picture. 

please please I need someone to help to understand the exact principle of this tool, as I use it and I need to explain how this function work. I have checked the manual and it seems not enough information about it. 

 

 

I wish if someone could help with this. 

 

Thank you in advance for your attention 

best regards 

Thoalfukar

0 Kudos
Message 1 of 7
(2,902 Views)

Open up the VI and look at its block diagram.    It has some comments to tell you what it's doing.

Message 2 of 7
(2,878 Views)

There are very few and I couldn't understand the code from that comments 

0 Kudos
Message 3 of 7
(2,837 Views)

Hi Thoal

 

I couldn't understand the code from that comments 

The help for this functions explains it very well:

  • Works on the assumption that ordered x array is in monotonically increasing or decreasing order and can therefore efficiently search for the relative index of the location of x value within the x array.
  • The VI starts the search at the starting index and begins by using a fast hunting phase to roughly bracket the location and then narrows to the final bracket using a bisection search.
  • The VI computes the fractional index location by using linear interpolation.

So what are you missing from this explanation?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 7
(2,831 Views)

Ok... I wish if you can a little bit patient with me. 

now if I want  to explain this tool in my own words, just to write about it in my paper.

would the following be convenient: 

 

The principle of its work:

First: define whether the values of the powers within the LUT are ascending or descending.

second: defining where is roughly the location of the of the power within the LUT in order to narrows  or partitioning the search area. After that the search will be within a small brackets, and if the exact value is not within that packet, the nearest index within that packet will be picked up.

 

best regards 

 

0 Kudos
Message 5 of 7
(2,823 Views)

Yes.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,820 Views)

Suppose I said "I'm thinking of a number from 1 to 1000.  You can "guess" 10 numbers, and I'll tell you if it is my number, or if it is too high or too low".  I'll also say that the right algorithm will always converge to my chosen number.  How would you do that?

 

The algorithm is called "Binary Search", and I'll leave it to you to either figure it out (hint -- Binary Search) or look it up.

 

Bob Schor

0 Kudos
Message 7 of 7
(2,805 Views)