06-15-2014 11:11 AM
I have array of past hundered data. I need to check condition whether it is true or not. like
1. a[0]-a[100]>100
2.a[2]-a[25]=89, etc. It should be respond to all condition.
kindly provide any solution.
06-15-2014 12:03 PM
You just need a formula node (or plain LabVIEW code) that handles all cases using conditionals. No need to change the formula at run time.
06-15-2014 12:10 PM
It should be respond to all condition.
Really? To respond to all possible conditions will require infinite time. I am not willing to wait that long.
Please be realistic. You have shown several possibilities:
a[i]/constant
a[i] - a[j]
a[i] + a[j]
a[i]-constant
and comparisons >, <, or = to constants.
That is a much smaller (although still very large) set of conditions.
The size of the array is probably irrelevant because an autoindexing for loop will handle any size array.
How will you (or your users) specify which conditions they want to test? How will the constants be entered?
Is there a formula to calculate the value of j for a given value of i? For example you mentioned a[2] - a[25] = 89. Is the next test a[3] - a[25] = 89. or a[3] - a[26] = 89, or something else? If both i an j increase, what do you do when the larger index reaches the end of the array?
Many of these things are easy to do, but we need to know exactly which ones you want to do.
Lynn
06-16-2014 12:16 AM
Thank you sir. The array which have maximum size is 1000. It is basically for data validation purpose.
a[11]-a[13]=0, a[67]+a[24]>16, etc . I just wanna know Whether my condition is true or not.
06-16-2014 09:00 AM
You have posted 8 different conditions in this thread.
1. a[0] - 30
2. a[0]/15 - a[5]
3. a[0] + a[1] > 150
4. a[31] - 50 < 100
5. a[0] - a[100] > 100
6. a[2] - a[25] = 89
7. a[11] - a[13] = 0
8. a[67] + a[24] > 16
You have been asked several times how you select or define the condition you want to test.
You have not answered that question.
We would like to help you but you are not provding enough information for us to do so.
Lynn