LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to compare array elements in data acquisition...

Hi All,
I am new to Labview and I am acquiring data from HP network analyzer throught GPIB. I am reading the data from analyzer and storing it as an excel file by converting it to two dimentional array. Each array has 201 elements in it. I need to compare the element of the array of current data to the element of the array of previous data for finding min. and max. Thus, at the end of the loop I will have all the data stored as well as two arrays containing min. and max. values for each elements. I do not have any problem storing the data; however, I can't find a way to compare elements of array for finding min. and max. Can someone advise me on this?
0 Kudos
Message 1 of 5
(3,109 Views)
Hi,
All you have to do is make use of the Comparision functions ,you have a 2D array so index it twice to get one element at a time and start comparing it element by element{ if you need to } else compare the whole 2D array at one short using the "equal" function ,so this will give you a boolean array ,make use of this for your further action.
Hope it helps else reply and i shall post you a example.
cheers
vicky
0 Kudos
Message 2 of 5
(3,102 Views)
Hi, Vicky,
Thank you for the reponse. Your reply seems too good in words but it does not meet my requirements. Let me explain you in little detain and it will help you to advise on helping.

My vi is made of a for loop which contains 12 sequences. In the middle of sequences, I have a sequence which takes data from analyzer in 1 by 201 array. The loop goes up to 50000 counts and at the end of the program, I have an excel file containing five hundred thousand 1 by 201 arrays. Other than storing the data, I want to get the difference between each relative element of 49999 arrays to the relative elements of the very first array. Thus, I am looking for those 50000 arrays as well as the 49999 arrays of the differences. I think this expains what exactly i want to acomplish.
I will await for your reply.

Thank you
0 Kudos
Message 3 of 5
(3,087 Views)
Hi Jatin,
Sorry i could not understand much from what you wrote,could you put a example Vi so that it shall be clear of what you are looking for.
cheers
vicky
0 Kudos
Message 4 of 5
(3,078 Views)
Could you insert a Min&Max function (from the comparison sub-palette, see below) in the appropriate sequence and create the corresponding Min and Max vectors at each new acquisition ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 5 of 5
(3,075 Views)