LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extraction of a string which is not available in both the string arrays


@tst wrote:

The idea is that variant attributes are an efficient way of storing and searching for values and it minimizes the number of times you need to go over elements.


As discussed elsehwere long ago, a variant attribute cannot be an empty string, but both current arrays contain empty strings. If you even try to set a variant attribute to an empty string, you'll get an error. This would need some exception handling if an empty string can be a valid solution element..

0 Kudos
Message 11 of 15
(971 Views)

Hi Altenbach,

 

 

Yes, you are right. I want 1D array containing all elements  in both arrays which are same, leaving the unmatched one.

 

Extra empty arrays are by mistake dont consider it.

 

0 Kudos
Message 12 of 15
(934 Views)

@mkReddy wrote:

Hi Altenbach,

 

 

Yes, you are right. I want 1D array containing all elements  in both arrays which are same, leaving the unmatched one.

 

Extra empty arrays are by mistake dont consider it.

 


Isn't that the contrary of what you asked in your first post???

 

Hi

 I have got two large array of strings. I would like to compare both of them with each other and extract the string which isnt available in both of the arrays.

Which is the best method to implement this.?

 

Ben64

0 Kudos
Message 13 of 15
(905 Views)

Hi Ben,

 

I want the 1D array as well the unmatched string ... Sorry for the mistake..

0 Kudos
Message 14 of 15
(895 Views)
  • How large are the arrays (you say "large", but never define what thea means! E.g. hundreds, thousands, or billions of elements?).
  • You still haven't said if there could be duplicate elements in the same array and if so, how to deal with them.
  • Are the arrays typically sorted (as in your example)
  • What is the average lenght of the strings?
  • Originally, you said that you want to extract the string (NOT strings!)  that only occurs in one of the arrays. Is the output guaranteed to be an array with exactly one element? If this is correct, why does the output need to be an array at all?
0 Kudos
Message 15 of 15
(884 Views)