I have 2 arrays, first array holds all the values for resource_wastage and 2nd array holds all the value for power_consumed. To implement a fuzzy logic I need to check of both resource wastage and power consumption are low at the same time then my output would be the array index, if one of them is low and second is not then I should move on to the next value in the array.
Eg:
for(int i=0, i<n; i++)
if(res_was[0] is low in all res_was[i=0 to n] && [pow_con[0] is low in all pow_con[i=0 to n])
{
print i;
break;
}
else continue with next value in arrays;
Please help how to I implement this, I mean check if the values in both arrays are low simultaneously.
You can use something like this. Arrays have special method for Min search.
May be you will need use more complex Min method. You can read about all of them in MSDN.