The sweep command, which for historical compatibility is also available as ``loop'', is used to perform a simulation analysis over a range of conditions.
sweep [-c] [[[pstr1] min1 max1 [step1]] [[pstr2] min2 [max2 [step2]]] [analysis]]The command works something like a chained dc sweep, running an analysis over a one or two-dimensional range of parameter values. The resulting plot will be multi-dimensional.
There are two fundamental ways in which parameter values can be passed to the circuit. In the command, the pstr1 and pstr2 are text tokens which specify the device parameters to vary, in a format to be described. In a two-dimensional sweep, both pstr1 and pstr2 must be given, or neither can be given. The two different value-setting mechanisms can not be mixed.
The specified analysis is performed at each point, yielding multidimensional output vectors. If analysis is omitted, an analysis specification is expected to be found in the circuit deck.
If a sweep analysis is paused, for example by pressing Ctrl-C, it can be resumed by entering the sweep command again. No arguments are required in this case, however if the -c option is given the old analysis is cleared, and a new analysis started if further parameters are supplied. The -c is ignored if there was no sweep analysis in progress. The resume command will also resume a paused sweep analysis. The reset command given with the -c option will also clear any paused sweep analysis.