This article presents a comprehensive MATLAB simulation of a 40 Gbps coherent optical fiber communication system using QPSK modulation over 100 km of standard single-mode fiber. Developed with tapered microfibres (aka nanofibres) in mind. Exact solutions for weak and strong guidance cases are provided. The simulation models the complete signal chain from QPSK signal generation through fiber propagation using the. In this paper, we present a detailed introduction to the teaching process of optical fiber communication courses by using a 16-channel WDM monitoring system as an example, and provide a comprehensive overview of collaborative simulation using MATLAB and OptiSystem software.