11-10-2014 04:53 PM - edited 11-10-2014 04:58 PM
hi,
i want to compare colum 1,2,5
if max - min > 1 = fail
how would i go about doing do?
i am thinking i should just delete all columns with 0s but i am having a difficult time deleting them.
can someone guide me how to do it.
thank you
Solved! Go to Solution.
11-10-2014 04:58 PM - edited 11-10-2014 04:59 PM
To analyze only valid columns, just iterate over all columns and ignore the colums that contain all zeroes. No need to delete them.
Also please attach your actual VI containing typical default data in the array control. We cannot debug pictures.
11-10-2014 05:00 PM
11-10-2014 05:00 PM
if you have any sugguestion on improving my code. please advise me. i would love to learn something new.
thanks!
11-10-2014 05:01 PM
It is not clear what you want. Do you want to take the max and min of all the data in those three columns combined or do you want separate max and min for each column?
Why bother with deleting the columns with zeros? max(col[0]) - min(col[0]) = 0.
Index through all the columns. Perform Array Max & Min on each column. Then OR (max-min) > 1 over all the columns. True = Fail.
Lynn
11-10-2014 05:04 PM
Thanks.
Your custom file IO subVI is missing. What does it do?
You have an huge amount of duplicate code and unneeded sequence structures. I think all you probably need is a single loop.
11-10-2014 05:05 PM
because if i would look at all the columns with the 0s in it.
row 0, max = 23.5 , min = 0
23.5 - 0 = 23.5 >>>>>>>>>>>>> FAIL, because its greater than 1.
i dont care for 0s
i am only interested in
21.3, 23.5, 22.2
max = 23.5
min = 21.3
>>>> 1, failed
11-10-2014 05:07 PM
here you go
11-10-2014 05:08 PM
@super_saiyans wrote:
because if i would look at all the columns with the 0s in it.
Of course you need to look at the columns with all zeroes one way or the other, but once you see that they are zeroes you can deal with it, right there and not analyze them further, right?
11-10-2014 05:11 PM
@super_saiyans wrote:
here you go
You seem to duplicate vi.lib VIs and save them in your own hierarchy. Don't do that!
(... now we are missing "read lines from file". is the one you are using different to the stock subVI?)