TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:

Sunday, March 20, 2016

Writing time to vector data output in ngspice control block


If you want to store the time as a vector alongside the columns of data in an ngspice simulation output, then you call the vector 't' which is the internal name for the time-stepped finite difference. 

For example, this control block prints out the time into a wrdata command.

**************************************************************
*  CONTROL BLOCK                                             *
**************************************************************
.control
set hcopydevtype=postscript
* allow color and set background color if set to value > 0
set hcopypscolor=1
*color0 is background color
*color1 is the grid and text color
*colors 2-15 are for the vectors
set color0=rgb:f/f/f
set color1=rgb:0/0/0
set color2=rgb:5/5/5
set color3=rgb:0/9/9
set color4=rgb:7/9/0
op
run
*  V(1) V(2) V(3) I(vss) V(7) V(6) V(5)
gnuplot   V(1) V(2) V(3) I(vss) V(7) V(6) V(5)
hardcopy multi-switch.ps  V(1) V(2) V(3) I(vss) V(7) V(6) V(5)
wrdata multiswitch.data  t V(1) V(2) V(3) I(vss) V(7) V(6) V(5)
.endc

which resulted in the following output:


 

No comments:

Post a Comment