Langmuir equation transformation

The objective is to convert to an equation that can be plotted as a straight line. The variables to plot are 1/q versus 1/C to get a straight line. 

Where q is the fractional occupancy of the adsorption sites
C is the concentration, but P for pressure is often used for situations involving adsorption of a gas.
Ka and Kd are rate constants related to rates of adsorption and desorption from the surface area.

Converted to Javascript July 2015 by Henry Bungay