Substitute Functions

Home Up 
This Page Format is Obsolete!  Go to new site : http://www.science-ebooks.com/javascript-js.html

This Site will go away in spring of 2016:  Please visit http://www.science-ebooks.com to see NEW SITE!

 

series 2 pure

 

Substituting Functions

You can change the formula for Parallel resistance to Series resistance, Series Capacitance or Capacitance Reactance , by making changes only to the black text of JS1.html
Declare variables as required.

Parallel Resistance
1/Rt =  1/R1 + 1/R2 + 1/R3;

Series Resistors
R(t) = R1 + R2 + R3 + R4 + R5 + R6

function mathgeneral(){
R(t) = R1 + R2 + R3 + R4 + R5 + R6; Alpha = ("Rtotal is "+Rt);
document.B1.T1.value = Alpha}

Series Capacitors
1/Ct =
1/C1 + 1/C2 + 1/C3
function mathgeneral(){
recipCt = 1/C1 + 1/C2 + 1/C3;
Ct = 1/recipCt ; Alpha = ("Ct is "+Ct);
document.B1.T1.value = Alpha}

Capacitance Reactance(Xc)
Xc = 1/(2*Pi*F*C)   Pi = 3.141, F = frequency, C = capacitance

function mathgeneral(){
Xc = 1/(2*Pi*F*C) ; Alpha = ("C is "+C);
document.B1.T1.value = Alpha}


Exercise: Develop a new program using functions above. Save (Safe As) giving each file its own name. Enter any values in variables that you like. Check your program results by performing same calculation by hand (with calculator of course.) 

 

 

 

 


        
Questions or problems regarding this web site should be directed to BilPat4342@AOL.com

Copyright ©2003 Science Ebooks All rights reserved.
Last modified: Monday January 18, 2016.