0 Replies - 431 Views - Last Post: 19 February 2010 - 03:29 AM Rate Topic: -----

#1 masocy   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 19-February 10

Trying to find correct place for a number in an array and get the valu

Posted 19 February 2010 - 03:29 AM

I have two one dimension arrays as doubles holding 10 variables,
modelValues(0 To 9) and catalogueX(0 To 9)
i'm trying to figure out how to find for each "modelValue" the correct sorted position in "catalogueX"
and geting the before and after "catalogueX" of each "modelValue" to use them in another function.

For Example If modelValue(0)=80.205 and the
catalogueX(0) = 60.100 Hold's 4 values
catalogueX(1) = 70.100
catalogueX(2) = 80.100
catalogueX(3) = 90.100

Then the results would be catalogueX(2)and catalogueX(3) because modelValue(0)=80.205 place is between them.
Both of the arrays are already sorted

I tried to do something but it is wrong i will try to find another way. [attachment=16596:Form1.txt]

Thanks in advance i would sure could use any suggestions

Is This A Good Question/Topic? 0
  • +

Page 1 of 1