As we all know, MATLAB is the best tool for solving complex numerical problems in a few steps. MATLAB is basically designed for solving of complex numerical and calculations. This is the most common language that is used in Mechanical engineering because the basis of MATLAB is the matrices operations and scientific calculations. For many parts of Mechanical engineering, this is the best tool. In Mechatronics, no other software is used rather than MATLAB because it allows the users to interact with the hardware. MATLAB provides all the necessary tools for Mechanical engineering.
MATLAB and C++, both are the best languages. If you want to learn more about the CAD or CAD related projects or if you have an interest in robotics and in automation than learning C++ is best or for your personal interest but if you want to excel in analysis or computation than MATLAB is the best language.