DEVPPL
http://www.devppl.com/forum/

urgent help needed
http://www.devppl.com/forum/viewtopic.php?f=57&t=13344
Page 1 of 1

Author:  hadimohammed365 [ Thu Apr 16, 2009 1:25 pm ]
Post subject:  urgent help needed

hello everybody,

i have a question, i am solving a mathematical problem by using a code in VB, the question is to calculate the output noise by givning ten different inputs by the user in textbox. the inputs wil be entered in the equation below like, B, Tin,Tfd,Te1,Te2,Te3,Gf,G1,G2,alpha, length

the formula for output noise power is ,

N= K*T*B

where K = 1.38*10^-23(boltzmann's constant)

B(bandwidth) = 5000(Hz), and

T = Tin+Tfd+(Te1/(Gf))+(Te2/(Gf*G1))+(Te3/(Gf*G1*G2))

where Gf = 10^(Gf/10) and G1 = 10^(G1/10), G2 = 10^(G2/10) and Tfd = (10^(Lf/10)-1)*290; where Lf=(alpha*length)

and, in coding i did that in this form;

Private Sub Command1_Click()



Dim Tin As Double

Dim alpha As Double

Dim length As Double

Dim Te1 As Double

Dim Te2 As Double

Dim Te3 As Double

Dim Gf As Double

Dim G1 As Double

Dim G2 As Double

Dim lf as Double

Dim tef as Double

Dim B As Double

Dim result1 as double

k = 1.38 * 10 ^ -23

lf = (a * l)

tef = (10 ^ (lf / 10) - 1) * 290

tequ = ts + tef + ((telna / (10 ^ (gef / 10)) + (temxr / ((10 ^ (gef / 10)) * (10 ^ (glna / 10))) + (teif / (10 ^ (gef / 10)) * (10 ^ (glna / 10)) * (10 ^ (gmxr / 10))))))

resut = k * tequ * B

result.Caption = result

result = Str(N)

End Sub

but it is stil not returning me the right answer...........where the answer is in the form of some negetive powers , for example like 2.34354*10^-4; somewhat like that..........IS THERE ANYTHING WRONG GOING WITH THE CODE? CAN ANYONE HELP ME WITH THIS?

THANKS

Author:  Suffer [ Thu Apr 16, 2009 5:22 pm ]
Post subject:  Re: urgent help needed

no one idea =(

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/