LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

comparing 2 array

Hi,

I have two arrays. I want check the new one with the old and remain the
new values delete the rest...

Any routin help?

TIA
0 Kudos
Message 1 of 3
(2,621 Views)
Volvo JazzHouse wrote:

> Hi,
>
> I have two arrays. I want check the new one with the old and remain the
> new values delete the rest...
>
> Any routin help?
>
> TIA

DONE

no need to reply.. sorry..!
0 Kudos
Message 2 of 3
(2,621 Views)
Hi Volvo,

This is what I understood your problem to be:

You have two arrays, Array Old and Array New - make an array containing the elements that exist only in Array New and not Array Old.

If this is the problem you are having, I have included a VI to implement this. It goes through each element in Array New, and searches this element in Array Old. If it does not exist in Array Old, then add the element to a new array (I have called this new array New Entries in the VIs).

I recommend you look at the non-memory efficient implementation, as it is more easier to read. I have also included a memory efficient version of the solution to avoid a build array in a loop, this can be useful if you are dealing with larger array sizes (hundreds of thousan
ds++, depending on your pc memory).

Good luck!
0 Kudos
Message 3 of 3
(2,621 Views)