The files in this folder contains small routines for MATLAB to compute and plot triangular probability denstity function. There are following 4 files:
tglpdf : Compute and plot triangular probability density function for given value of X (X can be scalar or matrix)
tglcdf : Compute and plot triangular cumulative distribution function for given value of X (X can be scalar or matrix)
invtglpdf: Compute the value of X from given value of probability density. This is inverse of tglpdf.
invtglcdf: Compute the value of X from given value of cumulative distribution. This is inverse of tglcdf.
Durga Lal Shrestha (2020). Triangular pdf (https://www.mathworks.com/matlabcentral/fileexchange/5635-triangular-pdf), MATLAB Central File Exchange. Retrieved .
thank u for the helpfull program
Fantastic, thank you very mutch for this program...
Me gustaría que me enviaran unos ejemplos de como utilizar cada uno de los coomandos.
Indeed, useful to have these functions programmed in Matlab. However the quad function can be avoided in the routine tglcdf, since an analytical solution for the cumulative triangular distribution function is available.
very useful. Because there is no such functions in Matlab or even in Excel.
pdf is integrated analytically to compute cdf and this gives faster solution than the quad function of Matlab as used in previous version. Also for invtglcdf, direct solution is obtained, but in previous version it required iterations.