MATLAB has the abilities of numerical analysis, matrix computation, signal processing, graphics and simulation. It is functional, efficient and easy to learn and so on in the field of electronic and information Engineering. According to the characteristics of strong theory, poor intuition and learning difficulty in electronic and information engineering course, the teaching methods of applying MATLAB to the specialty are presented. The example of digital image processing illustrates MATLAB is beneficial to help students deepen their understanding of abstract theory and improve classroom efficiency.