tags:

views:

271

answers:

3

How-to Calculate Ratio between 3 numbers with C#

I've 3 collections of doubles. These will be displayed as curves in a single chart.

Curve 1 : 1.5,1.6,1.7,1.8,1.9

Curve 2 : 3.5,3.6,3.7,3.8,3.9

Curve 3 : 5.5,5.6,5.7,5.8,5.9

Numbers range between these 3 curves are too different to be displayed correctly in the chart. So i want to "align" these 3 curves by doing a ratio or average on these, but i don't know how.

+3  A: 

Divide all the 3 numbers by the smallest number

Karim
+2  A: 

Lots of ways:

a/b, b/c, c/a, b/a, c/b, a/c
duffymo
well, at least six ways <grin>
Charles Bretana
Exactly six ways: (m+n-1)!/n!(m-n)! = 6 for m=3, n=2.
duffymo
+4  A: 

You can not calculate the ratio between three numbers. A Ratio is the quotient of TWO numbers.

When you see an expression written as r:s:t, it refers to the three individual ratios r:s, s:t and r:t

Charles Bretana
You can. Never seen something like 4:3:1? eg. this is how you could discribe the ration of border length in a cube.
Karim
@Karim - technically, that's just a short-hand representation of three ratios - 4:1, 3:1, and 4:3. By definition, a ratio is a relation between 2 numbers.
tvanfosson
@Karim, as @tvafosson says, whatever 4:3:1 might be, it's not a ratio. Please look at a definition... Using the term 'ratio' in this way is a misnomer, it's really defining 'three' ratios.
Charles Bretana