Advertisement

10.06.2008 at 05:10AM PDT, ID: 23790127 | Points: 500
[x]
Attachment Details

logarithmic scales, how to calculate a value with a slider bar

Asked by eneate in Visual Basic Programming, Programming Languages

Tags:

Hi

I have a slider bar which runs on a logaritmic scale. I use the value of the slider bar to caluculate the value.

The maximum value is 1000 and the minimum 100 this works fine. But I now need to work it the other way.

For example I know that the final value should be 1.0 but the value on the slider bar is 543 (or therabouts) but how do I change the formula to start at the end and work back to the beginning???Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
Dim n1 As Integer, Gamma As Variant, docid As Integer, n2 As Integer, n3 As Integer, y As Variant, a As Variant, gam_val As Variant
 
n1 = 100
n2 = 10
n3 = 400
 
frmcontrast.Slider3.Min = 100
frmcontrast.Slider3.Max = 1000 
 
y = 3.321928
 
gam_val = frmcontrast.Slider3.value
 
a = frmcontrast.Slider3.Max - gam_val
 
N = a / 1000
 
Gamma = N ^ y * 1000
Gamma = Round(Gamma, 2)
 
frmcontrast.Label3.Caption = Round(Gamma / n1, 2)
frmcontrast.Slider3.text = Round(Gamma / n1, 2)
 
Keywords: logarithmic scales, how to calculate a…
 
Loading Advertisement...
 
[+][-]10.06.2008 at 11:34AM PDT, ID: 22652965

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.06.2008 at 04:57PM PDT, ID: 22655538

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 - Hierarchy / EE_QW_2_20070628