Example of Bayesian Network using Bayes Net Toolbox (https://code.google.com/p/bnt/) in Matlab.
Hardcoded example is represented by graph below.
Image and Example source: "Journal of the Royal Statistical Society" S. L. Lauritzen and D. J. Spiegelhalter