newAddon = matlab.addons.install(fileName,agreeToLicense) 会根据 agreeToLicense 参数来确定附加功能的安装。当该参数为 true 时,它会先接受许可协议,再安装附加功能。
newAddon = matlab.addons.install(fileName,installOption) 会根据 installOption 参数来确定附加功能的安装。当该参数为 'add' 时,它会安装附加功能而不覆盖以前安装的版本。否则,如果已安装附加功能的一个版本,MATLAB 将覆盖以前的版本。
附加功能的安装位置取决于其类型。MATLAB 将 MathWorks® 产品安装在 matlabroot 文件夹中,将硬件支持包安装在 matlabshared.supportpkg.getSupportPackageRoot 返回的文件夹中。
Step 1: Verify the installed MinGW version
Before following the steps below, verify that you have installed the appropriate version of MinGW-w64 according to your version of MATLAB before following the steps below.
- MinGW-w64 version 8.1 for R2023a and later
- MinGW-w64 version 6.3 for R2018b and later
- MinGW-w64 version 5.3 for R2017b through R2018a
- MinGW-w64 version 4.9.2 for R2015b through R2017a
To check the MinGW version, open the Windows Command Prompt, navigate to the MinGW bin directory, and execute "gcc --version":