.step param n 0 5 1
Simulates the circuit for different values of n
, starting at 0, stopping at 5, with steps 1. So, n
is one of [0,1,2,3,4,5]
.param cc=0.01 ; delta
assign a value cc
= 0.01, not sure what the delta is, probably just a comment, not a LTspice command.
.param a1=table(n,0,0,1,1,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0)
a1
gets a value based on the value of n
, the table has the following structure,
table(index, pairs of key,value ). in your case n
is the index, and the bold ones are the keys, followed by non bold values.
table(n,0,0,1,1,2,0,3,0,4,0,5,0,6,0,7,0,8,0,9,0,10,0)
Notice that, n
is in [0,1,2,3,4,5], so many of those keys will never be reached/used
.param R1=2k*(1+cc*a1)
Assign the value of R1 = 2k*(1+cc*a1)
, equal to, R1 = 2k*(1+0.01*a1)
, that for n
=0 will be, R1 = 2k*(1+0.01*0)
. For n
=2, R1 = 2k*(1+0.01*0)
, and so on.
.meas Vout0 FIND V(out) when n=0 ; this will not work, see below
As pointed by pfabri in the comments, this measure operation will not work. It is unclear to me why that happens, but it seems that the expression used as a condition for when
can only be in terms of literals, currents and voltages, e.g., V(n001)=4+I(n002)
. Also, if the condition is never met you will also get that the measurement failed.