Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7894341
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:22:15+00:00 2026-06-03T07:22:15+00:00

I have 2 arrays, first array holds all the values for resource_wastage and 2nd

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:22:17+00:00Added an answer on June 3, 2026 at 7:22 am

    You can use something like this. Arrays have special method for Min search.

    var resMin = res_was.Min();
    var powMin = pow_con.Min();
    for(int i = 0; i < n; i++)    
    {
          if(res_was[i] == resMin && pow_con[i] == powMin)
          {
             Console.writeLine(i);
             break;
          }    
    }
    

    May be you will need use more complex Min method. You can read about all of them in MSDN.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two arrays, one of the arrays holds all the unique values of
i have two arrays like this first array Array ( [0228] => Array (
I have two arrays the first one has this structure Parameter Keys array array
Suppose I have two arrays like the following: $arr2 = array(array(first, second), array(third, fourth));
I have this array and I need to sort it, first by key_1 and
I have two arrays. Example of the first array: $arrayOne = array ( 'fruit'
I have an array that looks like $numbers = array('first', 'second', 'third'); I want
I have a php file somejson.php that echos a json encoded array {jsonone:first json,jsontwo:second
I have a large multidimensional array and I basically want to drop the first
This is the first time I have manipulated hashes and arrays in this way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.