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

16 views (last 30 days)
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

Accepted Answer

Sivsankar
Sivsankar on 29 Oct 2024
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!

More Answers (0)

Categories

Find more on Get Started with MATLAB Compiler SDK in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!