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 theta. The size of y is the common size of p, k, sigma, and theta. A scalar input functions as a constant matrix of the same size as the other inputs.
 When k = 0 and theta = 0, the Generalized Pareto
 is equivalent to the exponential distribution.  When k > 0 and
 theta = 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 > theta, or, when
 theta < 0, for
 0 <= (x - theta) / 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 ({"k = 1, σ = 1, θ = 0", "k = 5, σ = 1, θ = 0", ...
          "k = 20, σ = 1, θ = 0", "k = 1, σ = 2, θ = 0", ...
          "k = 5, σ = 2, θ = 0", "k = 20, σ = 2, θ = 0"}, ...
         "location", "northeast")
 title ("Generalized Pareto PDF")
 xlabel ("values in x")
 ylabel ("density")
                     | 
