07-06-2011 07:51 AM
Hi
I have 2 columns, of which I only wish to read the first column. There is an input value, which comes from an outside source, but we can call a constant for this particular question. This constant value must be compared to these first column values, untill it equals the same value. The code must then read the second columns value in the same row and output this value. The exel spreadsheet is below as an example, though the sheet has far more values and larger numbers.
If there is no value in the first column which is equal to the input constant, it must output a 0. If anyone could help with this it would be fantastic. I'm still busy working on it and might get it eventually, but I would like to get there faster a great deal.
Thanks
Jingles
07-07-2011 10:34 AM
Jingles,
if you get the data in a 2d array, you should be able to write soemthing like this pseudocode:
while i<max length
if checkvalue=array[1,i]
output array[2,i]
i++
if output is empty output zero
Regards,
Kyle Mozdzyn
Applications Engineering
National Instruments