We need to look up which MATLAB installations have received security patches. For example, the version number of our R2018a installer is 9.4.0.813654, and after installing the latest patch it is version 9.4.0.949201. However, the Get Info window and /Applications/MATLAB_R2018a.app/Contents/Info.plist only report the "9.4.0" part. Where is the rest of this information stored in the file hierarchy, so we can look it up without having to launch the app? We need this info for R2016a through R2018a, for Mac and Windows.

 채택된 답변

MathWorks Support Team
MathWorks Support Team 2018년 12월 20일

0 개 추천

This information can be found in the 'VersionInfo.xml' file that can be found in the MATLABROOT directory. If you want to find the location of the MATLABROOT directory, you can use this command in MATLAB to get the location:
>> matlabroot
However, please note that workflow would work only in R2017a and later. For versions before R2017a, while there is no direct way to find this information, please consider this workaround:
From the OS command prompt, use the following command:
> matlab -nodesktop -r fooScript
Here, the '-nodesktop' flag opens MATLAB in a Command-Window only interface and the 'fooScript' is a user-defined script file that does the following:
  • Runs the command: >> versionInfo = version;
  • Writes the output of the above command (stored in the 'versionInfo' variable) to a text file. You can use 'fprintf' to do this. For more information on 'fprintf', refer to the documentation link below:

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by