03-28-2014 03:20 PM - edited 03-28-2014 03:21 PM
I have some strings in 1d array string and I need to display the duplciate strings present in the 1d string array...pls let me know..I am using labview 2010 ver
Solved! Go to Solution.
03-28-2014 03:39 PM - edited 03-28-2014 03:44 PM
I would display them in an 1D array of strings indicator on the front panel.
If you are also interested on how to find the duplicate strings, do a forum search for e.g. removing duplicate elements, then adapt the code. Should be quite simple. There are plenty of wys to do that and some ways scale much better if the array are large. What have you tried so far? Is this for school?
03-28-2014 03:42 PM
I tried but i am not able to display
03-28-2014 03:46 PM
@Mandya wrote:
I tried but i am not able to display
Just wire the array of duplicate elements to an indicator terminal. Show us what you tried so far and we can give you tips how to fix it.
03-28-2014 03:56 PM
I have attached the VI
03-28-2014 04:11 PM
@Mandya wrote:
I have attached the VI
Well, there are several possible solution. Do you want all elelemts that are not in the current output or do you only want one each. For example if the array contains 3 of the same element, do you want it twice in the duplicate output?
I assume you only want it once, so simply scale the existing code accordingly. See attached example. If you want all, remove the inner case and search node and blindly append all duplicate elements.
Note that there are singificantly more efficient ways to do all this, but the current code is sufficient for small arrays.
03-28-2014 06:29 PM
thanks for your solution
07-21-2014 07:18 PM
How would you return the number of times the string was repeated?