sudo gedit /usr/share/applications/Matlab.desktop
[Desktop Entry]
Categories=Application;Development;
Comment=Matlab:
Encoding=UTF-8
Exec=/usr/local/MATLAB/R2021ab/bin/matlab -desktop -prefersoftwareopengl
Icon=/usr/local/MATLAB/R2021a/toolbox/shared/dastudio/resources/MatlabIcon.png
Name=MATLAB
StartupNotify=true
Terminal=false #在启动matlab时不启动终端
Type=Application
3.保存后退出