From the 31 User's Manual:
18.17.5.37 Let: Assign a value to a vector
General Form:
let name = expr
...
The command let creates a vector in the current plot. Use setplot (17.5.66) to create a new plot.
There is no straightforward way to initialize a new vector. In general, one might want to have
let initialize a slice (i.e. name[4:4,21:23] = [ 1 2 3 ]) ...
While initialization with a slice would be difficult since the extent needs to be defined when the vector is created, it should be possible to set a slice using a vector having the appropriate length, so things like
let v1[2:4,5:7] = a1 or let v1[2:4][5:7] = a1 should be permitted, assuming a1 has the right properties.
This feature will be added as part of the fix for bug #443.
The allowed forms are expressions like
That is, the indices can be an ngspice expression or a pair separated by a colon, in which case it defines a range. The index values must expand to real scalars, and the source data must have the correct number of elements, although dimension sizes for the source are not considered. That is, both a 2 X 2 vector and a 4-element vector of 1 dimension will provide 4 elements.
A minor fix to this feature is in commit e32991ae7aea4e3b63f2a72780c82c08f844b71d in branch beta_jdm