RB1.0 Pow method. 
Author Message
 RB1.0 Pow method.

The general formula is:

db = 20 Lg rho

thus:

RHO =POW (10,returnloss/20)
should do the trick (I checked it -> 1.1!!)
You  mixed in an e (=log(10)) somehow;
also 1/ .. ABS() ....  does not look too good ...

Mike

francine schrieb:

Quote:
> Hi all,

> I have some trouble with, I think, Pow.
> I'm using RB1.0
> I have an editfield and a vswr button.
> The object is to enter returnloss in dB in the edit field
> and then calculate te vswr.
> When I enter -26.444385 in the editfield and push
> the vswr button, it should give me 1.1
> But it shows 1.0018, and that is not correct.

> Are there some limitations to the Pow(x,y) method?

> Thanks in advance.

> The code for the vswr button:

> Sub Action()
> Dim vswr as double
> Dim Rho as double
> Dim ReturnLoss as double

> ReturnLoss=val(Editfield1.text)
> Rho=1/Pow(10,ABS(ReturnLoss)*log(10)/20)
> vswr=ABS((Rho+1)/(Rho-1))
> EditField1.text=Str(vswr)
> End Sub

> --
> francine



Sat, 01 Dec 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Differences RB1.1 - 2?

2. ports, dlls and pow

3. Using Pow! oberon-2 compiler with another program

4. Pow

5. POW-C-Oberon

6. Q: POW - Status?

7. POW plugins

8. Pow: Colorpane and bitmap ?

9. Dlls in POW!

10. Creating Buttons in POW Oberon-2

11. POW cursor resource help

12. POW! 3.0a/32 fern-example

 

 
Powered by phpBB® Forum Software