开个终端,vim ~/.profile 添加两行 export PATH=$PATH:/Applications/MATLAB_R2012b.app/bin/ alias matlab='matlab -nodesktop'