What about Uniform distribution and Montecarlo in Qspice?

I’m doing something wrong to simulate this? Gaussian distribution works fine but not the other two.

Thank you

Qspice seems not implement flat(x) and mc(x,y) yet.
An alternative way may be creating a function with random()?

.func flat(x) x*((random()*2)-1)
.func mc(x,y) x*(1+y*(random()*2-1))


Mike just implemented the flat(x) and mc(x,y) functions in Qspice. Now, in addition to random() and gauss() , these functions are all available for use in pre-parsing evaluations. However, please note that they are not be documented in the Qspice Help section yet. But you can expect to utilize these functions in your simulations without the need of user function method anymore.

  • Random() : Random value between 0 and 1, uniform distribution
  • Gauss(σ) : Random number from Gaussian distribution with standard derivation σ and mean value at 0
  • Flat(x) : Random number between -x and x with uniform distribution
  • Mc(x,y) : Random number between x*(1+y) and x*(1-y) with uniform distribution