GSL-RANDIST(1)

πŸ“¦
version 2.8 Β· 2 versions
, in alpine 3.24, arch rolling, centos-stream 9, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

okay so this is GSL-RANDIST(1) from the General Commands Manual β€” pull up a chair, bestie, we're learning a tiny GSL demo 🫢✨

πŸŽ€ NAME πŸŽ€

gsl-randist β€” generate random samples from various distributions. That's the whole vibe: random samples, various distributions, iconic behavior πŸ’…

✨ SYNOPSYS ✨

the page spells this section SYNOPSYS β€” not me, bestie πŸ™ˆ β€” and the shape is:

gsl-randist seed n DIST param1 param2 [..]

so you're giving it seed, n, DIST, then param1, param2, [..] β€” the parameters for whichever distribution you picked πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

gsl-randist is a demonstration program for the GNU Scientific Library β€” like a little show-and-tell for GSL πŸ§šπŸ’–. It generates n random samples from the distribution DIST using the distribution parameters param1, param2, ... .

🌸 EXAMPLE 🌸

Here's the example, and it's lowkey adorable because it pipes randist into the histogram tool and then plots it. We generate 10000 random samples from a Cauchy distribution with a width of 30 and histogram them over the range -100 to 100, using 200 bins πŸ”₯

gsl-randist 0 10000 cauchy 30 | gsl-histogram -100 100 200 > histogram.dat

A plot of the resulting histogram will show the familiar shape of the Cauchy distribution with fluctuations caused by the finite sample size πŸ¦‹

and to make the plot, the page gives this exact command:

awk '{print $1, $3 ; print $2, $3}' histogram.dat | graph -T X

πŸ”₯ SEE ALSO πŸ”₯

go check these out, iykyk πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

gsl-randist was written by James Theiler and Brian Gough. Copyright 1996-2000; for copying conditions see the GNU General Public Licence.

This manual page was added by the Dirk Eddelbuettel <edd@debian.org>, the Debian GNU/Linux maintainer for GSL.


source/version: GNU; page: GSL-RANDIST(1); date: no date shown on this page β€” that's the footer tea, bestie πŸ«ΆπŸ’–