Finding max and min dimension values using the 2nd dimension limit - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Finding max and min dimension values using the 2nd dimension limit

snooglets7snooglets7 Posts: 5Member
Hi,

I have a 2D array and I have to find the max and min value of each dimension. However, I also have to account for a limit on the value of the 2nd dimension...

arrSurvey(,) has 250 elements and 2 dimensions.

A user enters a limiting value which corresponds to the arrSurvey(i,1) dimension.

I sort the array for the 1st dimension, then somehow I have to find the highest and lowest arrSurvey(i,0) value that is within the corresponding arrSurvey(i,1) limit

Can anyone please help?

Peace




Comments

  • zibadianzibadian Posts: 6,349Member
    : Hi,
    :
    : I have a 2D array and I have to find the max and min value of each
    : dimension. However, I also have to account for a limit on the value
    : of the 2nd dimension...
    :
    : arrSurvey(,) has 250 elements and 2 dimensions.
    :
    : A user enters a limiting value which corresponds to the
    : arrSurvey(i,1) dimension.
    :
    : I sort the array for the 1st dimension, then somehow I have to find
    : the highest and lowest arrSurvey(i,0) value that is within the
    : corresponding arrSurvey(i,1) limit
    :
    : Can anyone please help?
    :
    : Peace
    :
    :
    The easiest way is to copy all rows of arrSurvey matching the limit into a new array. Then you can search for the lowest arrSurvey(i,0) within that new array.
Sign In or Register to comment.