title: Using a varying input to select values
body: <p>I have included part of my code below for reference. Essentially, I need to be able to choose the correct concentration values when a specific RH input is set. For example, if the RH were set to 0.2, I would need the concentration and activity values to be chosen automatically from the first row of each matrix. I am fairly inexperienced with coding, so this may be an easy fix,  but I'm a little lost on this. I would really appreciate any help!</p>
  <pre><code>RH = 0.8 #input any value from 0.2-0.9 with 0.1 steps 
  OrgMF = 0.1 #no units - range from 0.1 to 0.9 - organic to sulfate mass fraction
  Rc = 200*10**-9 #m (nm) - inorganic particle radius
  Vinorg = 4*math.pi*(Rc**3)/3 #m3 - volume inorganic 
  Minorg = Vinorg*1.5 #mass inorganic
  Morg = Minorg/(1/OrgMF-1) #mass organic 
  Vorg = Morg/0.9 #m3 - volume organic 
  Vtot = Vinorg + Vorg #m3 - volume total
  Rtot = (3*Vtot/4/math.pi)**(1/3) #m - radius total
  Lorg = Rtot - Rc #m - thickness of organic coating
  Ma = 0.1191390 #kg/mol - mass of IEPOX
  Sa = 4*3.1415*((Rc+Lorg)**2) #m2 - surface area of particles 
  Dg = 1e-4*0.1/Ptot #m2/s
  a = 1 #no units - mass accomodation 
  V = (4/3)*3.1415*((Rc+Lorg)**3) #m3 - particle vol 
  T = 280.0 #K
  R = 0.082057 #L*atm/k*mol 
  R2 = 8.314 #j/k
  Haq = 1*10**8 #M/atm - henrys law constant for IEPOX
  Horg = 6*10**5 #M/atm - henry's law for org layer 
  Dorg = 100*((1.38*10**-23)*T)/(6*3.1315*(5*10**5)*(315*10**-12)) #cm2/s - k*t/6*pi*viscosity*molecular radius - diffusion of IEPOX in org 
  w = ((8*R2*T)/(3.1415*Ma))**0.5  #m/s - book equ for mean speed (281 in paper?)
  kh = 3.6*(10**-2) #M-1s-1 - rate constant of H3O+ 
  kso4 = 1*(10**-4) #M-1s-1 - ballpark - rate constant of nucleophile SO4-2 
  khso4 = 7.3*(10**-4) #M-1s-1 rate consant of general acid HSO4-
  
  #RH vs H concentration, activity
  H_eaim = [[1.6*10**-5, 5.28*10**2], #RH 0.2 
            [1.67*10**-5, 1.6*10**2], #RH 0.3 
            [1.85*10**-5, 5.19*10**1], #RH 0.4
            [2.13*10**-5, 1.89*10**1], #RH 0.5 
            [2.53*10**-5, 7.41*10**0], #RH 0.6
            [3.07*10**-5, 3.1*10**0],  #RH 0.7
            [3.75*10**-5, 1.39*10**0], #RH 0.8
            [4.37*10**-5, 7.01*10**-1]] #RH 0.9
        
  #RH vs HSO4 concentrations,  activity 
  HSO4_eaim = [[8.4*10**-5, 1.97*10**0], 
               [8.33*10**-5, 1.89*10**0], 
               [8.15*10**-5, 1.81*10**0], 
               [7.87*10**-5, 1.7*10**0], 
               [7.47*10**-5, 1.55*10**0], 
               [6.93*10**-5, 1.37*10**0], 
               [6.25*10**-5, 1.14*10**0], 
               [5.63*10**-5, 8.49*10**-1]]
  
  #RH vs SO4 concentrations, activity vs RH value 
  SO4_eaim = [[1.6*10**-5, 6.09*10**-5], 
              [1.67*10**-5, 2.22*10**-4], 
              [1.85*10**-5, 6.25*10**-4], 
              [2.13*10**-5, 1.53*10**-3], 
              [2.53*10**-5, 3.02*10**-3], 
              [3.07*10**-5, 5.25*10**-3], 
              [3.75*10**-5, 8.3*10**-3], 
              [4.37*10**-5, 1.42*10**-2]]
  
  
  H =  #M of H+ - EAIM CONCENTRATION - need to choose from the eaim values above for all M concentrations  
  ah =  #EAIM ACTIVITY
           
  SO4 = 3*10**-2 #M of nucleophile SO4-2 EAIM CONCENTRATION 
  HSO4 = 1*10**0 #M of general acid HSO4- EAIM CONCENTRATION
           
  Mt = 0.13615 #kg/mol mass of tetrol 
  Ms = 0.216123 #kg/mol mass of sulfate product 
          
  Htet = 1*10**8 #M/atm tetrol estimate  
  Hs = 1*10**16 #M/atm sulfate product estimate
      
  Kaq = (kh*H) + (kso4*SO4*ah) + (khso4*HSO4) #s-1 - reaction rate constant from gaston - using auto-selected eaim concentration/activity values to calculate
  faqH = (kh*H)/Kaq
  faqSO4 = ((kso4*SO4*ah) + (khso4*HSO4))/Kaq
  </code></pre>