tricdf
"upper"
)Triangular cumulative distribution function (CDF).
For each element of x, compute the cumulative distribution function
(CDF) of the triangular distribution with parameters a, b, and
c on the interval [a, b]
. The size of p is
the common size of the input arguments. A scalar input functions as a
constant matrix of the same size as the other inputs.
p = tricdf (x, a, b, c, "upper")
computes the upper tail probability of the triangular distribution with
parameters a, b, and c, at the values in x.
Further information about the triangular distribution can be found at https://en.wikipedia.org/wiki/Triangular_distribution
See also: triinv, tripdf, trirnd
Source Code: tricdf
## Plot various CDFs from the triangular distribution x = 0.001:0.001:10; p1 = tricdf (x, 3, 6, 4); p2 = tricdf (x, 1, 5, 2); p3 = tricdf (x, 2, 9, 3); p4 = tricdf (x, 2, 9, 5); plot (x, p1, "-b", x, p2, "-g", x, p3, "-r", x, p4, "-c") grid on xlim ([0, 10]) legend ({"a = 3, b = 6, c = 4", "a = 1, b = 5, c = 2", ... "a = 2, b = 9, c = 3", "a = 2, b = 9, c = 5"}, ... "location", "southeast") title ("Triangular CDF") xlabel ("values in x") ylabel ("probability") |