Strength analysis of laminates is an important and difficult point in the course of mechanics of composite materials. The tedious mathematical calculations make the teaching monotonous and hard for students to accept. In order to improve the teaching, the MATLAB programming is introduced into the course. A typical example of strength analysis of orthotropic laminates is chosen to be solved, the relevant basic theories and analytical processes are made clear first, then the example is programmed with several MATLAB function files. By this method, not only the calculation process is greatly simplified, but also it is convenient to study the influence of the orthogonal laying ratio on the strength and failure processes of laminates, which provides a reliable basis for the strength design of laminates.