On Tue, Dec 29, 2015 at 6:12 PM, Gene Heskett <ghesk...@shentel.net> wrote: > > A paste of what I entered: > > define vc(vs,t,r,c) { > return vs * (1-e(-t/(r*c))) > } > for ( i=0.0; i<5.0; i += 0.1 ) { print i, ":", vc(120,i,83,.01 ),"\n" } 0:0
Sorry I missed that. Probably should stay off the list when I'm in a hurry. Rip the 0:0 off the end and see how that works: for ( i=0.0; i<5.0; i += 0.1 ) { print i, ":", vc(120,i,83,.01 ),"\n" } Or you could unpack it bit: for ( i=0.0; i<5.0; i += 0.1 ) { print i, ":", vc(120,i,83,.01 ),"\n" } The units should be volts, seconds, ohms, and farads. I'm not positive about farads, but the units were set up so that this equation would work without conversion, as I recall. Adding current and power should look something like scale=5; vs = 120; r = 100000; c = .00001; for ( t=0.0; t<5.0; t += 0.1 ) { vr = vs - vc; a = vr / r; p = vr * a; print"t: ", t, " vc:", vc(vs,t,r,c ), " a: ", a, " p: ", p, "\n" } -- Joel Rees Be careful when you look at conspiracy. Arm yourself with knowledge of yourself, as well: http://reiisi.blogspot.jp/2011/10/conspiracy-theories.html