The paper gives efficient algorithm of engineering structural reliability and its source program in Matlab with example. The paper introduces Mento-Carlo method, and stable reliability formula of slag concrete brick under compressed is established. And combined with data of experiment, it is given that its source program in Matlab. Matlab supplies many kinds of operation of matrix, and includes some toolboxes for the calculation of reliability, and it is very efficiency and convenience to make program of Matlab for the reliability calculation, which is easy to be grasped for the engineers. So its applying research on the reliability calculation will push forward the theory and application of structural reliability theory.