---
name: "gbrand"
section: "1"
platform: "linux"
package: "gbutils"
version: "6.3-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/gbrand"
---

# gbrand(1)

Sampling from random distributions

## NAME

gbrand - Sampling from random distributions

## SYNOPSIS

**gbrand** \[*options*\] *NAME PARAMETERS*...

## DESCRIPTION

Generates a grid of i.i.d. samples from a distribution. The name of the distribution and its parameters are specified on the command line. the column index. Indeces start from 1. If more than one function are provided they are printed one after the other. The type of random number generator and the default seed can be set with the environment variables GSL\_RNG\_TYPE and GSL\_RNG\_SEED, respectively, as documented in GSL manual.

## OPTIONS

- **-r**

  specify number of rows (default 1)

- **-c**

  specify number of columns (default 1)

- **-R**

  set the seed (default 1)

- **-v**

  verbose mode

- **-h**

  this help

### List of valid distributions (with parameters):

- beta

  a,b = shape parameters

- binomial

  p = probability, N = number of trials

- bivariate-gaussian

  sigmax = x std.dev., sigmay = y std.dev., rho = correlation

- cauchy

  a = scale parameter

- chisq

  nu = degrees of freedom

- dir-2d

  none

- dir-3d

  none

- dir-nd

  n1 = number of dimensions of hypersphere

- erlang

  a = scale parameter, b = order

- exponential

  mu = mean value

- exppow

  a = scale parameter, b = power (1=exponential, 2=gaussian)

- aexppow

  m = mode, al = left scale, ar = right scale, bl = left shape, br = right shape

- fdist

  nu1, nu2 = degrees of freedom parameters

- flat

  a = lower limit, b = upper limit

- gamma

  a = order, b = scale

- gaussian-tail

  a = lower limit, sigma = standard deviation

- gaussian

  sigma = standard deviation

- geometric

  p = bernoulli trial probability of success

- gumbel1

  a = order, b = scale parameter

- gumbel2

  a = order, b = scale parameter

- hypergeometric

  n1 = # tagged, n2 = # untagged, t = number of trials

- laplace

  a = scale parameter

- landau

  none

- levy

  c = scale, a = power (1=cauchy, 2=gaussian)

- levy-skew

  c = scale, a = power (1=cauchy, 2=gaussian), b = skew

- logarithmic

  p = probability

- logistic

  a = scale parameter

- lognormal

  zeta = location parameter, sigma = scale parameter

- negative-binomial

  p = probability, a = order

- pareto

  a = power, b = scale parameter

- pascal

  p = probability, n = order (integer)

- poisson

  mu = scale parameter

- rayleigh-tail

  a = lower limit, sigma = scale parameter

- rayleigh

  sigma = scale parameter

- tdist

  nu = degrees of freedom

- ugaussian-tail

  a = lower limit

- ugaussian

  none

- weibull

  a = scale parameter, b = exponent

- pareto3

  a = power, b = exponential parameter, s = scale parameter

## EXAMPLES

- gbrand -c 2 -r 100 gaussian 2.5

  generate two columns of 100 rows each sampling from a Gaussian distribution with mean 0 and standard deviation 2.5

- gbrand -R 145 -r 1000 exponential 1

  one hundredth exponantial variates with parameters 1, the the seed of the RNG is set to 145

- gbrand -r 10 flat 3 4

  ten realizations of the r.v. uniformly distributed in \[3,4\]

## AUTHOR

Written by Giulio Bottazzi

## REPORTING BUGS

Report bugs to \<gbutils@googlegroups.com\>

Package home page \<http://cafim.sssup.it/~giulio/software/gbutils/index.html\>

## COPYRIGHT

Copyright © 2001-2018 Giulio Bottazzi This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation;

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
