LCBD.comp function

Compute LCBD from any D matrix