It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

urgent help needed

Moderator: dafunkymunky

urgent help needed

Postby hadimohammed365 on Thu Apr 16, 2009 12:25 pm

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
hadimohammed365
 
Posts: 2
Joined: Sun Mar 29, 2009 10:30 am

Re: urgent help needed

Postby Suffer on Thu Apr 16, 2009 4:22 pm

no one idea =(
Suffer
100+ Club
 
Posts: 236
Joined: Tue Jan 20, 2009 6:34 am


Who is online

Users browsing this forum: No registered users and 4 guests