LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulling out values from a 1D array based on look-up-table...probably quite simple??

Hi
I would like to match data from a 1D array to the first column of a Look-up-table (LUT) and return the corresponding value on the second column of the LUT. The results should be stored in a new 2D array with the first column being the matching value from the original 1D array and the second column its corresponding value from the second column of the LUT.
 
For clarity, I have attached the front pannel explanation with my data.
 
I hope someone can help.
 
Best wishes,
 
 
0 Kudos
Message 1 of 2
(2,433 Views)
Is the LUT always increasing? At the moment you have it incremented by one, so you don't even need to look it up, just calculate the index directly.
What should happen if the exact element is not found? (e.g. return NaN, interpolate between adjacent elements, etc.)
 
Since you have all integers, why are you using DBL?
 
Attached (LabVIEW 8.0) shows three possible solutions that should give you some ideas. You probably need to modify for your exact requirements.
Message 2 of 2
(2,428 Views)