---
name: "plgen"
section: "1"
platform: "linux"
package: "plfit"
version: "0.9.6+ds-2+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/plgen"
---

# plgen(1)

generate samples from a power-law distribution

## NAME

plgen - generate samples from a power-law distribution

## SYNOPSIS

**plgen** \[*OPTIONS*\] *num\_samples gamma* \[*kappa*\]

## DESCRIPTION

Generates a given number of samples from a power-law distribution with an optional exponential cutoff. The pdf being sampled is given as follows:

P(k) = C \* k^(**-gamma**) \* exp(**-k**/kappa)

where C is an appropriate normalization constant. gamma is given by the second command line argument, kappa is given by the **-k** switch.

## OPTIONS

- **-h**

  shows this help message

- **-v**

  shows version information

- **-c**

  generate continuous samples

- **-k** KAPPA

  use exponential cutoff with kappa = KAPPA

- **-o** OFFSET

  add OFFSET to each generated sample

- **-s** SEED

  use SEED to seed the random number generator

- **-x** XMIN

  generate a power-law distribution that starts at XMIN
