The document presents the design and implementation of an emotion recognition system using MATLAB, focusing on facial expression analysis for applications in security, entertainment, and human-machine interfaces. The proposed system utilizes image processing techniques, including preprocessing, edge detection, feature extraction, and classification based on the distances of facial features to accurately identify emotions. Experimental results indicate that the algorithm can successfully recognize multiple emotions in static facial images, demonstrating potential for real-time application.