Formula needed

StudentD

New member
Joined
Jan 30, 2018
Messages
2
Hi all,
Apologies is this not in the right place

I am after some help getting a what seems a fairly simple formula. I want to show heart rate on a 360 angle dial. I guess the problem is I want to be able to adjust the lowest and highest value depending on results.

Initially I think 0 degrees should equal 30 bpm and 360 should equal 220 bpm. (30 = 0 degrees) and (220 = 360 degrees)
I could just multiply the value by say 0.1 to achieve a fairly acceptable result but I would like to adjust my high value and low value depending on data.

Is there any formula that could achieve what I want using the high and low values, for instance I may want to adjust the high end by decreasing to say 200 (200 = 360) .

Thanks in advance
 
You can't just scale the value. You must also move the starting value to zero (0).

[30,220]
-30 -- Move the zero (0)
[0,190]
360/190 -- Scale
[0,360]

This sort of thing occurs with ºF to ºC conversion. You should be able to find that in your searching.
 
I would think of this as asking for the equation of a line that passes through the points (30, 0) and (220, 360), where x is BPM and y is degrees. This is a common type of problem in algebra classes: Find the slope, and then use the point-slope form to write the equation.

The slope is [MATH]\frac{y_2 - y_1}{x_2 - x_1} = \frac{360 - 0}{220 - 30} = \frac{360}{190} \approx 1.8947[/MATH].

The point-slope form is [MATH]y - y_1 = m(x - x_1)[/MATH], which becomes [MATH]y = 1.8947(x - 30)[/MATH]. There's your formula.

You can replace various numbers with variables to make a more general formula that will adapt to different boundaries.
 
Top