What we are incrementing with a value of one.
You are incrementing the parameter run
which is a public/global and special variable for LTspice's internal use.
Is this something like in the 1st iteration we take resistor value as R = R+Tolerance and in 2nd it is like R-Tolerance, something like that?
No. mc()
function is something like a random generator between the given boundaries with a uniform distribution. In your circuit, at each iteration, each resistor will have a random value within the range set by their minimum possible and maximum possible values (i.e. in \$[R(1-tolb), R(1+tolb)]\$ range). And this function takes
The simulation requires a dummy iterator, hence the parameter run
(as stated before, a special variable for LTspice, just like time
) as input, so you need to manually increment it at reach iteration so that the random generator doesn't generate the same value. That is what driven by .step param
function does.
And this function takes the parameter run
(as stated before, a special variable for LTspice, just like time
) as input, so you need to manually increment it at reach iteration so that the random generator doesn't generate the same value. That is what .step param
function does.
CORRECTION: run
is not a global variable. In one of my earlier simulations in the past I used run
as a parameter for my random generator. That's probably where my confusion comes from. Sorry for the wrong information.