LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to extract numerical data from arrays

I have 2 separate arrays (1Dimensional). i want numerical data from each slot used one by one. e.g values in array are like 27, 43 , 59. so i want  to make a program where it will search 27, 43,59 number item one by one  in the 2nd array  and takes the value of that place  for me in a new array indicator.so i will have a 3rd array  created containing data from 2nd array formatted according to numbers given in 1st array. kindly someone guide me about it. Thanks.

0 Kudos
Message 1 of 6
(1,483 Views)

I don't quite understand your description particularly where you start bringing in a third away.

 

Have you taken the time to look through the function in the Array palette?

 

If you want to search for a value in an array, use Search 1-D array.

Once you have an index, use Index Array to get that value out of a second array.

 

As for your 3rd array, as I said, I don't know what you want.  But if you take the time to try to make it work and get stuck, then attach your VI into this thread so we can look at it.  (VI, not a picture of a VI).  Usually we can then have a sense of what you are trying to do and can make suggestions.

0 Kudos
Message 2 of 6
(1,456 Views)

kindly find the attachment.

0 Kudos
Message 3 of 6
(1,450 Views)
  • Please fill the string control with typical data, make it the default, and attach the VI once more.
  • Also save with a reasonable default value of "milliseconds to wait".
  • Never have terminals without labels
  • "delete from array" is not the correct function to take an "array subset"
  • The index array needs to be I32, not DBL
  • What is the point of the FOR loop?
  • Please explain what you mean by "extract"
  • ...

 


@danishrauf wrote:

I have 2 separate arrays (1Dimensional). i want numerical data from each slot used one by one. e.g values in array are like 27, 43 , 59. so i want  to make a program where it will search 27, 43,59 number item one by one  in the 2nd array  and takes the value of that place  for me in a new array indicator.so i will have a 3rd array  created containing data from 2nd array formatted according to numbers given in 1st array. kindly someone guide me about it. Thanks.


That description makes no sense.

0 Kudos
Message 4 of 6
(1,446 Views)

I have tried to explain in block diagram. Hope you can understand what i want to make.i'm sorry as I am new to the software.

0 Kudos
Message 5 of 6
(1,437 Views)

Its a bit confusing because you number the rows 1 based, while array indices are 0 based. (It is also not clear why you need to remove the first row, because you can account for the position shift later if needed.)

 

Here's a quick draft that maybe can give you some ideas....

 

altenbach_0-1599938944950.png

 

0 Kudos
Message 6 of 6
(1,413 Views)