LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

compare element of two array and ignore unwanted element of array

Solved!
Go to solution

hello

here i have attach the vi . In this vi i have to compare incoming array with ideal array from A to Z. normally in a input we get a data with noise as it is show in this vi normally i just need to compare value A with A &B with B, cwith c D with D and so on. now the problem is i have to compare ideal array with array from input string .and if  the input string is  not serially from A to Z the whole comparion is false .i hope you understand my problem and give some suggestion thanking you

0 Kudos
Message 1 of 13
(4,524 Views)

Hi kalu,

 

you could search the array instead of strictly comparing element by element:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 13
(4,510 Views)
Solution
Accepted by topic author kalu

Please take a look at this modified version of your code and let me know if it is what you are looking to accomplish.

 

Please ask questions and make sure you are comfortable and understand what I have coded.

CLD | CTD
LabVIEW 2011 SP1 | TestStand 4.5
Message 3 of 13
(4,504 Views)

thank you for reply i have try this way also but in this way we can compare element line by line but the problem is not just comparing for example if i have P in the position of  E then come E now i have to negelect that p and compare ´received E with Ideal E .

 if  there no possibility to neglect noise in between, and compare with required. and continue this prosesses in each line

0 Kudos
Message 4 of 13
(4,496 Views)

Thanks the modified version is a good example but still it doesn't fulfilled my requirement.

 

that means i just need the two row of same data (line by line )as in Ideal Array although there is noise in between . suppose if D has value 1 in ideal array the input has also same value it just because of P is as noise so it value of D is shown in P.

 

actually the value shown in P should be value of D

 

hope you can help me to find the solution thanking you

regards

0 Kudos
Message 5 of 13
(4,483 Views)

Hi Kalu,

 

I really don't understand what you trying to achieve...

 

All that A,B and C,D. All those "value in P should be value in D" and all that "noise" in some string arrays!?

 

Please explain what you need. Please show examples of what you need. Show pictures of what you need.

Show anything that really explains your goal!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 13
(4,462 Views)

This example work properly , but in addition, after all correct data  i want the vale of noise also at the end.that means first  A To Z then at the end the noise and their respective value at the end.

i hope you understand me

 

best regards

0 Kudos
Message 7 of 13
(4,434 Views)

Hi kalu,

 

please explain the term "noise" with respect to your array of strings! I don't know what you are talking about.

 

Did I mention you should show an example of what you want to achieve?

 

- Create a VI with two arrays on the front panel.

- Label the first one "data before calculation" and fill it with typical data.

- Label the second one "data after calculation" and fill it with typical results.

- Explain how the ealgorithm should work to get the data from first to second array...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 13
(4,422 Views)

sorry that i could not explain you properly hope this Vis and comment written in front panel can be more understandable . as in vis i need the valve from A to Z as output as well as noise and their respective value but these are not present in Ideal array as noise defer from one device to another. the value from A to Z and as well noise also are important data .forexample lets call noise as unknow variable.

 

i hope you can understand my problem with this example.

 

hopping for positive response 

best regards

0 Kudos
Message 9 of 13
(4,415 Views)

Hi Kalu,

 

the mist begins to clear...

 

So you compare a received (string) table with a predefined table and you already got results for the predefined table.

 

Now all you need to do compare the other way around:

Search for each entry in the received array an entry in the predefined array. When no predefined value is found you can consider that row as "noise" that will be collected for display...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 13
(4,413 Views)