Distance Weighted Discrimination (DWD) is a widely used matrix data classification model. However, the model usually experiences significant performance degradation when severe noise contamination is present in the data. Robust Principal Component Analysis (RPCA) has become one of the effective ways to solve this problem due to its ability to separate the low-rank structure and sparse component of matrix data. Therefore, a Robust DWD for matrix data (RDWD-2D) model was proposed. In particular, the model performs robust principal component analysis on data in a supervised way, which can achieve the recovery and classification of clean data simultaneously. Experimental results on MNIST and COIL20 datasets show that in the case of matrix data contaminated with noise or missing values, the RDWD-2D model has the best data recovery capability and the highest classification accuracy compared with DWD-2D, RPCA+DWD and other models. Also, the RDWD-2D model demonstrates good robustness to the degree of data contamination.