05-05-2017 06:35 AM - edited 05-05-2017 06:35 AM
Hi,
I am trying to subtract first element with other elements of array to check whether the results is more than abs.5 or not. Then i want to get this ROW number of that element.
Ex: array is 1,1,2,3,4,4,5,6,7. i will check 1-1 > 5? else 1-2 > 5 else 1-3> 5 until.... 1-6 > 5.
now i want to save/get this ROW number of 6 i.e 8 to use it somewhere. and stop this subtraction process.
How can i?
Solved! Go to Solution.
05-05-2017 06:36 AM
05-05-2017 06:51 AM
Hi Blokk,
Thanks for your reply. I did gone through some basics and even tried few solutions.
But am struck at finding the ROW when the case is true and get out of the loop/exit/stop.
Any help is appreciated.
05-05-2017 06:56 AM - edited 05-05-2017 06:58 AM
your requirement states "|1-6|>5 == success", but that means you might want a greater-equal comparison.
btw .. you should talk about index/element-at, a row makes sense only in a multi dim array
05-05-2017 06:57 AM
You get help more likely if you attach your VI with comments. Show us what you find difficult, or what is not clear. Try to break the home work into smaller parts, and first solve/understand these, before putting everything together.
Do not expect that someone gives you here a complete solution. But if you give a good question, you can get a good answer 😉
Some hints: do you understand how While and For loops work? Do you understand Shift Registers? Did you get familiar with the Array functions? Do you understand Data Flow in LabVIEW?
If your answer is NO for some of these questions, then you should learn a bit more the basics...
05-05-2017 06:59 AM
sorry .. i like doing homework sometimes 😉
05-05-2017 06:59 AM
@jwscs wrote:
your requirement states "|1-6|>5 == success", but that means you might want a greater-equal comparison.
sjscs: Please do not solve home works, this forum is not for that.
05-05-2017 10:47 AM
05-09-2017 04:07 AM
Thanks Paul.
yes this what i was looking for. Search and find the array index when it is True worked for me.
i was struck at how to handle the array of T,F booleans.
05-09-2017 04:20 AM
This is mainly a performance questions. I have a master list of all users existing in a String array AllUids. I also have a list of all end dated users existing in a String array EndUids.