seanscal Posted August 19, 2013 Report Share Posted August 19, 2013 (edited) Hi, What I have is two different files with about 150 different elements each. These files could have the same elements or could have different ones, so what I need to do is create an array which returns the elements which match from one array with the rest of the row in that array... It's difficult to explain but say these are the two files: array 1 array 2 A 1 A B 2 B C 3 E D 4 F E 5 G F 6 H G 7 H 8 I need a new Array which would be array 3 A 1 B 2 E 5 F 6 G 7 H 8 I tried this, but what happens is that if, say there were 3 less elements in the second array than the first, my code causes it to take off the last 3 elements in the array instead of the three which were missing Edited August 19, 2013 by seanscal Quote Link to comment
crossrulz Posted August 19, 2013 Report Share Posted August 19, 2013 Give this guy a try. It uses autoindexing and the Search 1D Array in order to find the necessary values. Compare Arrays.vi 1 Quote Link to comment
seanscal Posted August 19, 2013 Author Report Share Posted August 19, 2013 Ah thank you! hooked up my arrays to that and it worked perfectly! And much easier than how I was trying it Quote Link to comment
bveritoa Posted February 7, 2018 Report Share Posted February 7, 2018 I wander if you can take out the other values,the ones that are not match. I try with conditional for loop wit negate.. nothing seems to work.... Quote Link to comment
crossrulz Posted February 7, 2018 Report Share Posted February 7, 2018 If you want to use Conditional Terminals, I would do something like this. 1 Quote Link to comment
willsan Posted February 8, 2018 Report Share Posted February 8, 2018 15 hours ago, crossrulz said: If you want to use Conditional Terminals, I would do something like this. yes, the method is good and simple to realize。 Quote Link to comment
Frank22 Posted July 24, 2019 Report Share Posted July 24, 2019 (edited) Sorry I have two excel files with a column of unique numbers respectively. The first column is complete and does not undergo changes, the second column appears to be with the same column but with a lower number of elements. I converted the excel files into 2D arrays even if only the first column is the one compiled about 900 fields of numbers only I should look for the array missing elements in the first column. I tried to adapt the "crossrulz" *.VI but I can't find the correct solution example ARRAY 1 COMPLETE ARRAY 2 RESULT 1 1 - 2 - 2 3 3 - could you please help me? Edited July 24, 2019 by Frank22 Quote Link to comment
crossrulz Posted July 24, 2019 Report Share Posted July 24, 2019 So you just want the missing elements? Quote Link to comment
torekp Posted August 16, 2019 Report Share Posted August 16, 2019 Wow, conditional auto-indexing in loops has been around since Labview 2012? How the heck did I not notice this? Quote Link to comment
Aristos Queue Posted August 29, 2019 Report Share Posted August 29, 2019 If you have LV 2019, this will be faster if your array gets large enough* * "large enough" varies by CPU and memory of specific hardware. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.