RC Circuit
vin 1 0 1.0
r1 1 2 1MEG
c1 2 0 1uF
.ic V(1)=0 V(2)=0
.tran .001s 5s
.end
running in
ngspice and plotting (plot v(1),v(2))we get
The new lines of note are the
.ic and the .tran. .ic sets the initial conditions of all nodes. .tran sets the time step, and total time for the transient analysis. If you have both .dc and .tran in a single file, the last one is what will show up in an interpreter. If you do a batch run of course, both will be put into the result file.
No comments:
Post a Comment