LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read write data

Solved!
Go to solution

Hi ,

 

I am reading string array from one txt file and now i want to compare the first character of the each element of this array and read corresponding line.How can i do it?i have attached some picture so you can understand easily.

 

 

 

0 Kudos
Message 1 of 9
(2,507 Views)

use string subset, then compare...

Example_VI.png

0 Kudos
Message 2 of 9
(2,495 Views)

Thanks for reply

 

You did not get my question actually in above picture you can see first character is like

0                           o.4755  21

0                           0.4766  22

1                           0,4822  36

1                           0,4877  23

This is my index for measurement.now for another measurement i want to read this first character(index no) and select corresponding row

0 Kudos
Message 3 of 9
(2,484 Views)

0

0

1

1

this first character itself is index number for my measurement so i want to search this index no and read corresponding line like here i want measured value for no 1

0 Kudos
Message 4 of 9
(2,463 Views)

@royal1 wrote:

0

0

1

1

this first character itself is index number for my measurement so i want to search this index no and read corresponding line like here i want measured value for no 1


Are you trying to read all of the lines with an index of 1?  If not, which one do you read?


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 5 of 9
(2,456 Views)

yes exactly i need all line with character 1(index 1)

0 Kudos
Message 6 of 9
(2,451 Views)
Solution
Accepted by topic author royal1

Hi, I guess u are looking for multiple search result as shown.

If not replace for loop with while loop with "stop"  criterion either "i => array size" or search criteria gets any match 

 

0 Kudos
Message 7 of 9
(2,449 Views)

Yes my friend exactly i want this one Smiley HappySmiley HappySmiley HappySmiley HappySmiley Very HappySmiley Very Happy

 

Thank you very much

0 Kudos
Message 8 of 9
(2,444 Views)

take a look at this, I think this one is better..

0 Kudos
Message 9 of 9
(2,440 Views)