script with 'ver' command returns different products and licenses within matlab and from deployed archive on production server. See detail below

36 次查看(过去 30 天)
in Matlab run, I got this:
{'Name: MATLAB, Version: 24.1, Release: (R2024a), Date: 19-Nov-2023' }
{'Name: MATLAB Compiler, Version: 24.1, Release: (R2024a), Date: 19-Nov-2023' }
{'Name: MATLAB Compiler SDK, Version: 24.1, Release: (R2024a), Date: 19-Nov-2023'}
running the deployed archive, I got this:
"lhs": [...
"mwdata": [
"Name: MATLAB, Version: 24.1, Release: (R2024a), Date: 19-Nov-2023",
"Name: MATLAB Compiler, Version: 24.1, Release: (R2024a), Date: 19-Nov-2023"
],...
]
======here is the script I used====
function m = getlicenseinfo()
% Copyright 1984-2019 The MathWorks, Inc.
% All Rights Reserved.
toolboxInfo = ver;
% Prepare a cell array to hold the formatted output
m = cell(length(toolboxInfo), 1);
% Loop through the structure and format the output
for i = 1:length(toolboxInfo)
m{i} = sprintf('Name: %s, Version: %s, Release: %s, Date: %s', ...
toolboxInfo(i).Name, ...
toolboxInfo(i).Version, ...
toolboxInfo(i).Release, ...
toolboxInfo(i).Date);
end
end

采纳的回答

Sivsankar
Sivsankar 2024-10-29,10:22
The deployed archive runs on the MATLAB production server. So, the difference between the products in your MATLAB and in the deployed archive is because of the difference in the MATLAB instance that is being executed.
This can be because of the difference in the MATLAB runtime version in the MATLAB production server, which executes the deployed archive in comparison to the local MATLAB
You can leverage the following documentation to explore more about the MATLAB runtime that is incorporated in your MATLAB production server and specify the MATLAB runtime version of your choice:
Another reason can be that when you compile your MATLAB code into a deployable archive, the required products are determined by the code itself. So, the MATLAB instance of your deployed archive would be different than MATLAB in your local environment.
You can also refer the following guide on the MATLAB production server:
Hope this helps!

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB Compiler SDK 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by