.control run set sweep_list = ( 1e-13 1e-12 1e-11 1e-10 1e-9 ) foreach tempe $sweep_list * echo within while loop "$&tempe" alter cf1 $tempe ac oct 10 1 10G end * echo after while loop "$&tempe" setplot set xbrushwidth=1 plot db(ac1.vo) db(ac2.vo) db(ac3.vo) db(ac4.vo) .endc Some issues: temp is already used internally. Set... requres spaces after ( and before ) Alter ... requires a number, not a variable
Incorrect description of N device type in manual
Thanks Fix Uploaded
Patch #115 Incorrect description of N device type in manual
Please have a look at the ngspice-43 manual, chapter 13.6.4 Foreach - End
plot ac1.db(vo) ac2.db(vo) ac3.db(vo) ac4.db(vo) was wrong plot db(ac1.vo) db(ac2.vo) db(ac3.vo) db(ac4.vo) is correct
.control run let temp = 1e-13 while temp le 1e-10 alter cf1 temp ac oct 10 1 10G * plot db(vo) let temp = temp * 10 end setplot set xbrushwidth=3 plot db(ac1.vo) db(ac2.vo) db(ac3.vo) db(ac4.vo) .endc setplot will show how many plots have been generated.
.control run let temp = 1e-13 while temp le 1e-10 alter cf1 temp ac oct 10 1 10G * plot db(vo) let temp = temp * 10 end setplot plot db(ac1.vo) db(ac2.vo) db(ac3.vo) db(ac4.vo) .endc setplot will show how many plots have been generated.