Delete duplicate in a array

hello,
i'm a student and i want to know how to delete duplicate in an array.
I explain i have an array and i want to delete all the value which appears more than one time.
you can see an exanple in attachment, with some explanation.
i use labview 8.5, and if someone can help it will be great.
And escuse me for my english, i'm french and i don't speak english very well.
Solved!
Go to Solution.
Attachments:
array.png ‏28 KB
arrayok.png ‏29 KB

Here is a 2D version. You will have to keep in mind if one array is longer than the other that the array will automaticlly add zero to the array to make it the same length.
Tim
Johnson Controls
Holland Michigan
Attachments:
delete duplicates 2D.vi ‏12 KB

Similar Messages

  • Change array size and delete duplicate row

    Hello,
    I am running a program that does a for loop 3 times.  In each loop, data is collected for x and y points (10 in the example provided).  How can I output the array with the 30 points in a simple 2D array (size 2x30)?
    Also, from the array, how do I delete duplicate rows that contain the same x-value? 
    Thanks,
    hiNi.
    Solved!
    Go to Solution.
    Attachments:
    array size.vi ‏10 KB

    Hello,
    THANK YOU for solving my first issue!  Attached is the data set that contains the duplicate entries for the x-axis values.  The y-axis value may be different, but not the x.  I would like to delete the 2nd row that contains the same x-value.
    Here is simple example of my input and desired output:
    IN: 
    28.512000 -115.310532
    28.812000 -86.937660
    29.112000 -116.877052
    29.412000 -87.223625
    29.412000 -111.349045
    30.012000 -86.510780
    30.312000 -112.048187
    OUT:
    28.512000 -115.310532
    28.812000 -86.937660
    29.112000 -116.877052
    29.412000 -87.223625
    30.012000 -86.510780
    30.312000 -112.048187
    I am thinking of comparig the last x-axis value to the current one, and if it is the same, then not parse that row.  The attached VI is as far as I got.
    Any help will be greatly appreciated.
    Thanks,
    hiNi
    Attachments:
    delete duplicate row.vi ‏8 KB
    data.txt ‏1 KB

  • HOW TO DELETE DUPLICATE ELEMENT IN A VECTOR

    Hi everybody!
    If I've a vector like this vectA={apple,orange,grape,apple,apple,banana}
    and I want final result be vectB={apple,orange,grape,banana}.
    How should I compare each element in vectA and delete duplicate element. Like here duplicated element is apple. Only one apple remain in the vectB.
    Any help,
    Thanks.

    Hello all. Good question and good answers, but I would like to elaborate.
    To begin with, you specifically asked to map the following:
    {apple,orange,grape,apple,apple,banana} ==> {apple,orange,grape,banana}
    Both of cotton.m's solutions do NOT do this, unfortunately. They are both useful in particular cases though, so think about what you're trying to do:
    cotton.m's first solution is best if order does not matter. In fact, as flounder first stated, whenever order doesn't matter, your most efficient bet is to use a Set instead of a List (or Vector) anyways.
    Set vectB = new HashSet(vectA);This code maps to {banana, orange, grape, apple}, because HashSets are "randomly" ordered.
    cotton.m's second solution is good if you want to impose NEW ordering on the List.
    Set vectB = new TreeSet(vectA);This code maps to {apple, banana, grape, orange}, because TreeSet uses alphabetical-order on Strings by default.
    java_2006, your solution is the most correct, but it's a little verbose for my taste :)
    more importantly, the runtime-efficiency is pretty bad (n-squared). calling Vector.contains performs (at worst) n comparisons; you're going to call it n times! Set.contains usually performs 2 comparisons (constant, much better), so I suggest you USE a Set to do the filtering, while still sticking with your good idea to use a List. When the ordering is "arbitrary" (so can't use TreeSet) but still relevant (so can't use HashSet), you're basically talking about a List.
    I think saving A LOT of time is worth using A LITTLE extra space, so here, let's save ourself some runtime, and some carpal-tunnel.
    import java.util.*;
    class Foo {
         public static void main(String[] args) {
              String[] fruits = {"apple","orange","grape","apple","apple","banana"};
              List     l = Arrays.asList(fruits),
                   m = filterDups(l);
              System.out.println(m);
         // remember, both of the following methods use O(n) space, but only O(n) time
         static List filterDups(List l) {
              List retVal = new ArrayList();
              Set s = new HashSet();
              for (Object o : l)
                   if (s.add(o))
                        retVal.add(o);     // Set.add returns true iff the item was NOT already present
              return retVal;
         static void killDups(List l) {
              Set s = new HashSet();
              for (Iterator i = l.iterator(); i.hasNext(); )
                   if (! s.add(i.next()))     
                        i.remove();
         // honestly, please don't use Vectors ever again... thanks!
         // if you're going to be a jerk about it, and claim you NEED a Vector result
         // then here's your code, whiner
         public static void mainx(String[] args) {
              String[] fruits = {"apple","orange","grape","apple","apple","banana"};
              List l = Arrays.asList(fruits);
              Vector v = new Vector(l);
              killDups(v);
              System.out.println(v);
    }

  • How can i delete duplicates from my itunes account?

    At "View" I chose "Show duplicates."
    Now what do I do to delete duplicates quickly without having to delete each one separately?
    THanks

    Hello, singinheart. 
    Thank you for the question.  Since you have already identified the duplicate media you just have a couple more steps to go.  This article outlines the remainder of the steps in order to mass delete the duplicates. 
    How to find and remove duplicate items in your iTunes library
    http://support.apple.com/kb/ht2905
    Cheers,
    Jason H. 

  • How do you delete duplicate tracks off your playlist?!

    How do you delete duplicate tracks off your playlist - everytime I connect my hard-drive it adds another of every single track - argh!!!!
    I remember there being a 'delete duplicate tracks' option on a much older version of itunes - is this still available and if not if you opt for the 'consolidate library' option will this automatically save to you computer as I have too much music for my laptops memory capacity! On top of that how can I stop this issue from contantly re-occuring everytime I connect my hard-drive?! Apologies if im being thick here.... xX*laura*Xx

    You are doing something wrong, iTunes doesn't add tracks to the library unless you ask it to, so there is a problem somewhere in your workflow which is creating the duplicates. For example, having iTunes set up to "Copy files to the iTunes Media folder when adding to library" and then repeatedly adding in a folder from an external drive would do it.
    Once you've worked out how to stop creating new duplicates you can look at the issue of deduping what you already have. See this recent post for some thoughts and a script that may prove useful.
    tt2

  • How do you delete duplicate songs in your library without having to delete each song individually??

    How do you delete duplicate songs in your library without having to delete each song individually?

    mauijiminar wrote:
    Go to iTunes, select view and click show duplicates. Hold control and A ( select all) and then delete.
    Not a good idea! The "show duplicates" feature shows "all" duplicate tracks, but you only want to delete the "extra" copies, not the "originals".
    I've written a script called DeDuper which can help remove unwanted duplicates. See this  thread for background, including how to delete the extra tracks manually if you prefer.
    tt2

  • How do I delete duplicate songs, but keep a link in their original albums to the single copy of the song left, so it will play in each album in sequence as if it were still there?

    Greetings!
    After importing my 300 or so CDs into iTunes, I found I have tons of duplicate songs.
    Example: I have a song that came in a original album, then in again in a "Greatest Hits" album, then again in a "Hits of the 80's" album, and again in a soundtrack album. I have now have 4 copies of the exact same song.
    How do I delete duplicate songs, but keep a link in their original albums back to the single copy of the song left, so it will play in each album in sequence as if it were still there?
    I don't think this currently exists, but as my library keeps growing the duplicates keep growing.  It would be nice if Apple sees this and adds a way to link songs to multiple albums.
    I don't want to create a custom playlist for every album that has a duplicate song or two (I'd have dozens of playlists) - thought about fixing it that way but not really practical.

    To my knowledge, there is no way of doing what you want. The only workaround is to create playlists for the other albums containing the track, but that isn't practical for most people.
    You could provide Apple with feedback here: http://www.apple.com/feedback/itunesapp.html

  • How do you delete duplicate photos in the photo section of your iPad?

    How do you delete duplicate photos in the photo section of your iPad?  My iPad has duplicated n tripled my photos n want let me delete them.  I can delete photos from any other section but not in photos, this is taken up all my memory. Help!!

    The links below have instructions for deleting photos.
    iOS and iPod: Syncing photos using iTunes
    http://support.apple.com/kb/HT4236
    iPad Tip: How to Delete Photos from Your iPad in the Photos App
    http://ipadacademy.com/2011/08/ipad-tip-how-to-delete-photos-from-your-ipad-in-t he-photos-app
    Another Way to Quickly Delete Photos from Your iPad (Mac Only)
    http://ipadacademy.com/2011/09/another-way-to-quickly-delete-photos-from-your-ip ad-mac-only
    How to Delete Photos from iPad
    http://www.wondershare.com/apple-idevice/how-to-delete-photos-from-ipad.html
    How to: Batch Delete Photos on the iPad
    http://www.lifeisaprayer.com/blog/2010/how-batch-delete-photos-ipad
    (With iOS 5.1, use 2 fingers)
    How to Delete Photos from iCloud’s Photo Stream
    http://www.cultofmac.com/124235/how-to-delete-photos-from-iclouds-photo-stream/
     Cheers, Tom

  • How do I delete duplicate songs from my library that have been automaticly downloaded from itunes?

    How do you delete duplicate songs from an iphone 3gs?  I did the automaticly download song feature when doawloading from my CPU and now there are 11 songs that no matter what I do will not come off my phone.  I have tried everything.  Also how do you shut off this automatic download feature?

    Hello momoandfam,
    Welcome to Apple Support Communities.
    Take a look at the article linked below, it’ll answer your questions about finding and deleting duplicate tracks in your iTunes library.
    Find and remove duplicate items in your iTunes library - Apple Support
    Take care,
    -Jason

  • Is there a way to automatically detect and delete duplicate photos in a library

    I just imported a load of photos into my main iPhoto '11 Library from several older MAC's Photo Libraries. Despite repeatedly using the "Don't Import Duplicate Photos" dialogue box, I have many duplicate photos. Is there a way to automatically detect and delete Duplicate Photos?
    I also have iPhoto Library Manager installed on my MAC, but cannot seem to locate on it anything that would do this.
    I have over 4,000 photos, so would really appreciate some help here! Thanks in advance...

    duplicate annihilator - http://www.brattoo.com/propaganda/
    And NEVER import an iPhoto library into another iPhoto library - doing so des not work and creates massive duplication
    if you still have all of the original iPhoto libraries I recommend you drag the bad one you created to the desktop (delete it later when everythin has successfully been completed) and start over usin iPhoto Library Manager - http://www.fatcatsoftware.com/iplm/ -  to merge the libraries
    LN

  • How to delete duplicate music in itunes

    I have been downloading a lot of my old CD's and have found I have a lot of duplicate songs from a variety of my album sets...how can I delete them so I only have one of each one?
    thanks!
    Jan

    Dupin may be what you need. If you have the same song as part of different albums then, in my opinion, these aren't really duplicates. Personally I wouldn't throw away some of the tracks on the Beatles "White Album" because I also have them on the "Blue Album".
    For some more thoughts, including tips on how to manually delete duplicates if you have the patience, see this post. It's written from a PC perspective so you may need to use Option or Cmd instead of Shift or Ctrl.
    tt2

  • How to delete duplicate rows in a table

    hai,
    i have a table which consists of hunderds of records and contains duplicate records also. how can i delete duplicate records.
    thanks
    ravi

    This maybe a litle bit fast for deletion:-
    delete from emp where rowid in (
    2 SELECT rowid FROM emp
    3 group by rowid,empno,ename,job
    4 minus
    5 SELECT min(rowid) FROM emp
    6 group by empno,ename,job);

  • How to delete duplicate photos in iphoto

    working in iphoto and want to delete duplicates that were created when I used migration assist to import the iphoto library to new machine.  it duplicated all of my pictures.  Using iphoto 9.1.3

    Did you import one Library to another? That's the usual cause of this.
    If you still have the original library the simple solution is to just trash the damaged Library and do it again. This time don't import the LIbrary, just open it.
    Other than that For dealing with duplicates in iPhoto check out Duplicate Annihilator
    Regards
    TD

  • How to delete duplicate pictures in iPhoto

    I have many duplicate pictures in iPhoto. Is there an easy way to identify and delete duplicates?

    Check out Tidy Up!

  • How to delete duplicate records in all tables of the database

    I would like to be able to delete all duplicate records in all the tables of the database. Many of the tables have LONG columns.
    Thanks.

    Hello
    To delete duplicates from an individual table you can use a construct like:
    DELETE FROM
        table_a del_tab
    WHERE
        del_tab.ROWID <> (SELECT
                                MAX(dups_tab.ROWID)
                          FROM
                                table_a dups_tab
                          WHERE
                                dups_tab.col1 = del_tab.col1
                          AND
                                dups_tab.col2 = del_tab.col2
                          )You can then apply this to any table you want. The only differences will be the columns that you join on in the sub query. If you want to look for duplicated data in the long columns themselves, I'm pretty sure you're going to need to do some PL/SQL coding or maybe convert them to blobs or something.
    HTH
    David

Maybe you are looking for

  • Memory upgrade on Tecra M7

    How do you actually upgrade the RAM on a Tecra M7. This is a new laptop and the correct memory card has already been purchased. I just can't find any technical info in the manual or on the website as to how to physically do this. Regards Marion

  • Install Shield Error

    anybody install the new upgrade and not be able to install it? as i go through the set up, an error mesage pops up and says that Install Shield has failed. the set up then freezes. the worst parts are that i can't shut down my PC without holding the

  • SSL in HTTP adapter

    Hi All, Would I be able to use an HTTP adapter for HTTPS connection. As currently i am unable to see any SSL feature in HTTP adapter in Comm Channel. Please guide me with info and links as to how would I be able to enable it. I am using PI7.1 Thanks,

  • Error in people search when connecting through ldaps port

    Hello, I am getting following error when doing windows people search through ldaps port(636). The specified directory service could not be reached. The service may be temporarily unavailable or the server name may be incorrect. It is working fine whe

  • After downloading Firefox, my e-mail spell check doesn't work

    for years I had used IE. I recently installed Firefox and now my e-mail spell check doesn't work. The dictionary is loaded but cannot figure out how to resolve this. It still works when using IE, so am assuming it's a Firefox glitch.