ni.com is currently experiencing unexpected issues.
Some services may be unavailable at this time.
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
已解决! 转到解答。
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.
if you have any sugguestion on improving my code. please advise me. i would love to learn something new.
thanks!
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
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.
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
here you go
@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?
@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?)