LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a 3D lookup table from CSV

Solved!
Go to solution

It works exactly as how I want it. Thanks a lot.

 

If i would want to interpolate the output value if lets say I give an input which is not in my list (for example x =15e+7, y = 4700, and z = 0.5, here Y is the value which is not included in my inputs. If i then want the output to be an interpolated value, could a solution be to change the threshold block to a interpolate 1D array block? If i give the aforementioned input right now the output is instead rounded to a nearby output value from the CSV file 🙂

0 Kudos
Message 21 of 40
(1,425 Views)

You need to do a trilinear interploation based on your fractional indices. Not trivial.

 

(See also this idea and its links)

 

Alternatively, you could fit your 3D data to a reasonable model (if one exists), and then get the value of any point in space based on model and parameters.

Message 22 of 40
(1,421 Views)

Ok I will look into that!

 

One more maybe way more trivial thing is that my output right now rounds to fewer decimals then I want even though it is a 64 bit double. If I for example want a output value of 41.577854 it rounds to 41.578 even though a 64 bit Double can handle way more than just 3 decimal points

0 Kudos
Message 23 of 40
(1,414 Views)

You can change the format of the display to anything you want (right-click...display format...). The value cannot be more precise that whatever you had in your data file, of course. 😄

 

(The display is a purely cosmetic. The underlying data is always full precision)

Message 24 of 40
(1,411 Views)

Ok but in my data file I have the value of 41.577854 which LabVIEW  rounds to 41.578 instead.

0 Kudos
Message 25 of 40
(1,406 Views)
Message 26 of 40
(1,404 Views)

Ok I understand! You have been more than helpful to me, thanks a lot! Which post is most convient to mark as a solution? I will of course also both give you and @LLindenbauer kudos! 🙂

0 Kudos
Message 27 of 40
(1,398 Views)

You can mark more than one as solution, I think.

0 Kudos
Message 28 of 40
(1,394 Views)

Maybe this solution could be realized by just connecting LabVIEW with Matlab and just the "interp3" function from there? Then Matlab can do the work for me.

0 Kudos
Message 29 of 40
(1,329 Views)

... or you could just use my trilinear interpolation I linked earlier. 😄

 

(of course you need to calculate the fractional indices by thresholding into the three 1D arrays as already shown)

0 Kudos
Message 30 of 40
(1,318 Views)