gpcdf
              "upper")Generalized Pareto cumulative distribution function (CDF).
For each element of x, compute the cumulative distribution function (CDF) of the generalized Pareto distribution with shape parameter k, scale parameter sigma, and location parameter theta. The size of p is the common size of x, k, sigma, and theta. A scalar input functions as a constant matrix of the same size as the other inputs.
 […] = gpcdf(x, k, sigma, theta, "upper")
 computes the upper tail probability of the generalized Pareto distribution
 with parameters k, sigma, and theta, at the values in
 x.
 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
 τπ 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: gpinv, gppdf, gprnd, gpfit, gplike, gpstat
Source Code: gpcdf
| 
 ## Plot various CDFs from the generalized Pareto distribution
 x = 0:0.001:5;
 p1 = gpcdf (x, 1, 1, 0);
 p2 = gpcdf (x, 5, 1, 0);
 p3 = gpcdf (x, 20, 1, 0);
 p4 = gpcdf (x, 1, 2, 0);
 p5 = gpcdf (x, 5, 2, 0);
 p6 = gpcdf (x, 20, 2, 0);
 plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", ...
       x, p4, "-c", x, p5, "-m", x, p6, "-k")
 grid on
 xlim ([0, 5])
 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", "northwest")
 title ("Generalized Pareto CDF")
 xlabel ("values in x")
 ylabel ("probability")
                     | 
