gppdf
              Generalized Pareto probability density function (PDF).
For each element of x, compute the probability density function (PDF) of the generalized Pareto distribution with shape parameter k, scale parameter sigma, and location parameter mu. The size of y is the common size of p, k, sigma, and mu. A scalar input functions as a constant matrix of the same size as the other inputs.
 When k = 0 and mu = 0, the Generalized Pareto CDF
 is equivalent to the exponential distribution.  When k > 0 and
 mu = k / k the Generalized Pareto is equivalent to
 the Pareto distribution.  The mean of the Generalized Pareto is not finite
 when k >= 1 and the variance is not finite when
 k >= 1/2.  When k >= 0, the Generalized Pareto
 has positive density for x > mu, or, when
 mu < 0, for
 0 <= (x - mu) / sigma <= -1 / k.
Further information about the generalized Pareto distribution can be found at https://en.wikipedia.org/wiki/Generalized_Pareto_distribution
See also: gpcdf, gpinv, gprnd, gpfit, gplike, gpstat
Source Code: gppdf
| 
 ## Plot various PDFs from the generalized Pareto distribution
 x = 0:0.001:5;
 y1 = gppdf (x, 1, 1, 0);
 y2 = gppdf (x, 5, 1, 0);
 y3 = gppdf (x, 20, 1, 0);
 y4 = gppdf (x, 1, 2, 0);
 y5 = gppdf (x, 5, 2, 0);
 y6 = gppdf (x, 20, 2, 0);
 plot (x, y1, "-b", x, y2, "-g", x, y3, "-r", ...
       x, y4, "-c", x, y5, "-m", x, y6, "-k")
 grid on
 xlim ([0, 5])
 ylim ([0, 1])
 legend ({"ξ = 1, σ = 1, μ = 0", "ξ = 5, σ = 1, μ = 0", ...
          "ξ = 20, σ = 1, μ = 0", "ξ = 1, σ = 2, μ = 0", ...
          "ξ = 5, σ = 2, μ = 0", "ξ = 20, σ = 2, μ = 0"}, ...
         "location", "northeast")
 title ("Generalized Pareto PDF")
 xlabel ("values in x")
 ylabel ("density")
                     | 
