The function 'estimateLDL(TC, HDL, TG, InputUnits)' provides an estimate for the LDL cholesterol on measured total cholesterol (TC), HDL cholesterol, and triglycerides (TG).
For most cases, the classical formula by Friedewald, Levy, and Fredrickson dated back to 1972  (usually called the Friedewald formula) is used.
For low triglycerides, the recent (2008) formula by Ahmadi et al.  is used.
TC - total measured cholesterol as listed in the blood test,
HDL - measured HDL cholesterol as listed in the blood test,
TG - total triglycerides as listed in the blood test,
InputUnits - 'conventional' (mg/dL) or 'SI' (mmol/L).
OUTPUT (rounded as in usual blood test reports):
eLDL.mg - estimated LDL [mg/dL], rounded to integers
eLDL.mmol - estimated LDL [mmol/L], rounded to two decimal places.
 Friedewald WT, Levy RI, Fredrickson DS: "Estimation of the Concentration of Low-Density Lipoprotein Cholesterol in Plasma, Without Use of the Preparative Ultracentrifuge". Clinical Chemistry, vol.18, no.6, 1972, pp.499-502.(PUBMED record: http://www.ncbi.nlm.nih.gov/pubmed/4337382 ; ORIGINAL: http://www.clinchem.org/content/18/6/499.full.pdf)
 Ahmadi SA, Boroumand MA, Gohari-Moghaddam K, Tajik P, Dibaj SM: "The Impact of Low Serum Triglyceride on LDL-Cholesterol Estimation". Archives of Iranian Medicine, vol.11, no.3, 2008, pp.318-321. (PUBMED record: http://www.ncbi.nlm.nih.gov/pubmed/18426324 ; ORIGINAL: http://www.ams.ac.ir/aim/08113/0014.pdf)
EXAMPLE 1 (more or less standard triglycerides; conventional units):
> LDL = estimateLDL(210, 36, 236, 'conventional')
EXAMPLE 2 (low triglycerides; SI units):
> LDL = estimateLDL(5.8, 1.48, 0.68, 'SI')
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.