04-19-2012 10:07 PM
hi guys ,
i have a for loop with N = 60 , i'm trying to make something when the index (i) reachs specific number , the indecies i'm interested in are
1 ,5 , 9,13, 17, 22, 26, ,30,34,38,43,47,51,55,59
the difference is 4 in some of them but it changes to 5 @ 22 and 43 and come back to 4 in between .
can anybody help me pick up these indecies ?
Solved! Go to Solution.
04-19-2012 10:44 PM
04-20-2012 12:00 AM
no , i want to do the same thing whenever that index happen , i just want to change a boolean variable . case structure is a good one but i wonder if there is a mathmatical way to do it ?
04-20-2012 12:34 AM
Not a formula, but here's one way to do it:
steve
04-20-2012 12:39 AM - edited 04-20-2012 12:41 AM
Why would you need a mathematical formula?
What is a "boolean variable"? In the context of LabVIEW, you need to explain in more detains what you mean ;))
I would just do something similar to the following (The second loop will iterate 60 times):
Note that the parts on the left will be folded into a single boolean array constant at compile time, so there is no overhead during execution.
(You can also do it all in a single loop. try it. ;))
04-20-2012 12:50 AM
Hi,
Try this..
Regards,
Nitz
(Give Kudos to Good Answers, Mark it as a Solution if your problem is Solved)