06-18-2022 10:04 AM
Ok, then a solution to my problem could maybe be to use the VI "TrilinearInterpolationTester".
After that for the gridlines (X, Y, Z) I can just put them into the built in "interpolate 1D Array function?"
06-18-2022 01:27 PM
Ok now I have looked into the trilinear VI a little bit more. And as you mentioned the interpolation. And the fractional indexes can as you mentioned be calculated with help of the treshold array. '
What I do not understand is why the incircled array and constant is structured the way they are? Also why is the length sent to the array subset array set to 2? Maybe all these values are default values?
Will this function also interpolate the x, y, z inputs that I feed to the table?
06-18-2022 02:16 PM
You need to threshold into your three axes to get the fractional indices. The trilinear interpolation uses the 8 nearest values to calculate the interpolation in that cube.
06-18-2022 02:52 PM
Alright I think I understand. So the purpose of the fractional indices is to "fill in the gap" where the interpolated output w is for the corresponding fractional index combination of x y z?
What threshold value should I set for each axis, is it something I chose freely?
Also is it possible to instead of giving index values give the actual value AT the index when the values has been interpolated? Like its possible to do in the previous example you helped me with?
06-18-2022 04:29 PM
For each coordinate (x, y, or z), you would use it to threshold into the corresponding ramp (x, y, or z) to get the fractional index in each dimension. Use these for the trilinear interpolation.
06-19-2022 02:44 AM
All you probably need is this code, remove the "to I32", and replace the index array with my interpolation.
06-19-2022 04:17 AM
If I understand you correct do you mean like this?
I tested it aswell and it really seems to work actually. If needed I also attached the VI together with the gridlines CSV.
06-19-2022 06:20 AM
You don't need the "index array...built array" song & dance in the lower loop. Just wire the 1d array directly. Same thing, less code!
06-19-2022 06:40 AM
That is true, does the code looks reasonable besides from that?
Btw which function fills the constant matrix in the Interpolation VI?
06-19-2022 02:35 PM
A few more comments:
@antje668 wrote:
Btw which function fills the constant matrix in the Interpolation VI?
The diagram constants are filled manually according to the theory. It is a 2D array, not a matrix.