LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how delete the special rows of array string

how i can delete  string's rows that have &&KK, in this array?

0 Kudos
Message 1 of 11
(3,113 Views)

 

  1. Wire string data into a for loop
  2. Use Match pattern inside the array to detect &&KK and use conditional indexing to output just the elements that don't have &KK
0 Kudos
Message 2 of 11
(3,106 Views)

plz more explain, i want to delete the rows including &&kk,

0 Kudos
Message 3 of 11
(3,071 Views)

What don't you understand?  You were told exactly what to do.  What have you tried?

 

You use a FOR loop to go through each element of your array.  Use Match Pattern to do the check for &&kk in the string.  If it was not found autoindex that value out.  The conditional indexing is very useful here.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 11
(3,062 Views)

i try it, but it dont work

 

0 Kudos
Message 5 of 11
(3,040 Views)

Post your code. It will help us help you.

In what way is it not working?

0 Kudos
Message 6 of 11
(3,036 Views)

Also please next time don't attach a 6MB VI containing a sample array with almost 100k elements. A sample array with 20 elements would be sufficient to show the problem.

0 Kudos
Message 7 of 11
(3,014 Views)

@crossrulz wrote:

The conditional indexing is very useful here.


He posted in LabVIEW 6.1, which does not have any conditional indexing.

 

Still there are plenty of threads here that show how to filter a 1D array ... 😉

0 Kudos
Message 8 of 11
(3,007 Views)

Good observation on the 6.1. I guess marii will have to

  • Create a shift register with an empty array of strings.
  • Go through each element in String Data and  search for &&KK using match pattern
  • Use a case structure to either append the String Data element to the shift register or leave the shift register as is.
  • Create an indicator from the output of the loop's shift register

Whew, I guess I know why NI added the conditional tunnels.

0 Kudos
Message 9 of 11
(2,996 Views)

altenbach wrote:

He posted in LabVIEW 6.1, which does not have any conditional indexing.


I did notice that after I made that post.  That will indeed make things more interesting.

 

OpenG has some good examples of how to filter an array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 11
(2,978 Views)