Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
6.0.1 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Aide de Scilab >> Fonctions spéciales > gamma

gamma

The gamma function.

Syntax

y = gamma(x)

Arguments

x

real vector or matrix

y

real vector or matrix with same size than x.

Description

gamma(x) evaluates the gamma function at all the elements of x. The gamma function is defined by :

and generalizes the factorial function for real numbers (gamma(n+1) = n!).

Examples

// simple examples
gamma(0.5)
gamma(6)-prod(1:5)
// the graph of the Gamma function on [a,b]
a = -3; b = 5;
x = linspace(a,b,40000);
y = gamma(x);
clf()
plot2d(x, y, style=0, axesflag=5, rect=[a, -10, b, 10])
xtitle("The gamma function on ["+string(a)+","+string(b)+"]")
show_window()

See also

  • gammaln — Le logarithme de la fonction gamma.
  • dlgamma — dérivée de la fonction gammaln ou fonction psi.

History

VersionDescription
5.4.0 Overloading allowed for list, mlist, tlist and hypermatrix types.
Report an issue
<< findm Fonctions spéciales gammaln >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Feb 12 19:15:30 CET 2018