This example shows how to create a deployable archive for MATLAB® Production Server™ using a MATLAB function. You can then hand the generated archive to a system administrator who will deploy it into MATLAB Production Server.
To create a deployable archive:
Create a MATLAB function
addmatrix.m that adds two
function a = addmatrix(a1, a2) a = a1 + a2;
At the MATLAB command prompt, enter
The output appears as follows:
ans = 3
Open the Production Server Compiler app.
On the toolstrip, select the Apps tab.
Click the arrow on the far right of the tab to open the apps gallery.
Click Production Server Compiler.
In the Application Type section of the toolstrip, select Deployable Archive from the list.
If the Application Type section of the toolstrip is collapsed, you can expand it by clicking the down arrow .
Specify the MATLAB functions you want to deploy.
In the Exported Functions section of the toolstrip, click the plus button.
If the Exported Functions section of the toolstrip is collapsed, you can expand it by clicking the down arrow.
Using the file explorer, locate and select the
Click Open to select the file and close the file explorer.
Explore the main body of the project window.
The project window is divided into the following areas:
Archive Information — Editable information about the deployed archive.
Files required for your archive to run — Additional files required by the archive. These files will be included in the generated archive. See Manage Required Files in Compiler Project.
Files packaged with the archive — Files that are packaged with your archive. These files include:
The Package window opens while the library is being generated.
Select the Open output folder when process completes check box.
When the deployment process is complete, a file explorer opens and displays the generated output.
Verify the contents of the generated output:
for_redistribution — A
folder containing the installer to redistribute the archive to the
system administrator responsible for the MATLAB
for_testing — A folder
containing the raw files generated by the compiler
PackagingLog.txt — A log
file generated by the compiler.
Click Close on the Package window.
To lean more about MATLAB Production Server see MATLAB Production Server