请参考 https://www.mathworks.com/matlabcentral/answers/439328-how-to-remove-trailing-whitespace-on-save#answer_356002 或 https://stackoverflow.com/questions/19770347/how-to-auto-remove-trailing-whitespaces-on-save-in-matlab