LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

interpolate 2 rows from a 2d array

I try to interpolate 2 rows from a 2d array, i want to have an array in size of the 1 row.
i know the rows value to interpolate (such as 6.5, 13.87, 0.8...)
input: interpolate row value
output: array in size of 1X6

i attached the table and the idea of work path.

i can't do it, i don't know how to get data from each col. in separate.

i hope for help

thanks

Yoni

 
0 Kudos
Message 1 of 16
(4,011 Views)
Hi Yoni,

it's not completely clear to me what you want to achieve, but maybe the attachment may help you...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 16
(4,007 Views)
GerdW

thanks for the quick response.
your addition for half values was nice.

what i try to achieve:
this data is from measurments that i've done. each row equivalent to certain Freq.
i take the data for certain Freq. and translate it to Power in another LUT that translate volt to power - i know that i complicated the all thing, maybe in the future i'll start it all over again.
i attached my all system vi.

my for loop was not complited, it was just an idea. i thought about using a shift reg for each iteration but i don't know how.

i'm stuck now on the interpolate array.

hope u can help me.


0 Kudos
Message 3 of 16
(4,004 Views)
Hi Yoni,

well, the 'Lookup Table.vi' is missing...

Where exactly is your problem? Don't you know how to use a SR (shift register)? Is the problem inside the missing subvi?
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 16
(3,996 Views)
The problem is not in the SubV.

u right about the translate from Freq to row numbers, i don't know why i didn't thought about it.

my problem is to get an interpolate row (a 1X6 array) according to the "row number" value.

i attached 2 files of look up tables (it's the same structure - i cloned it because i had problems running the same subVI in differents places)

thanks

Yoni


Download All
0 Kudos
Message 5 of 16
(3,991 Views)
Hi Yoni,

still not really got what you exactly need Smiley Sad

But I have attached a new attempt Smiley Wink
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 16
(3,982 Views)
GerdW,

first - thank u for the time and efforts.

i'm sorry i'm not clear enough.

i add notes to the vi so u can understand what i'm trying to do.
and attached the data as a .xls file.
(i know the Freq. (in the VI was 195 but can be anything between 190 to 410) and the VDC (it's an input for the system by an ADC card - in the VI was at a random number multiply by 3.4 to represent all the possible values)).

look at this please.

Regards,

Yoni

Download All
0 Kudos
Message 7 of 16
(3,975 Views)
Hi Yoni,

now I got it: from f and U you want to know the P level...

The attached vi should do it (I removed your subvis to show the working principle).
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 16
(3,970 Views)
Your VI outputs only round number (0,10,20...) but i wanted every number, so i changed your VI a little to fit (it's attached).

Anyway, this it what i wanted so thank you very much, u made my day!

Best regards,

Yoni.
0 Kudos
Message 9 of 16
(3,964 Views)
Damn!

It's not it!!!

in the Front Panel, in the "Array - Data for final LUT" - i need to see values that interpulate between 190-200, according to the Freq value (195/198/193...)
 - it's not right to use the floor function, because the right value for 195 in our example is not the first row and not the second - it's a interpulation between the two rows.

do u understand or that i'm not clear enough again?
0 Kudos
Message 10 of 16
(3,961 Views)