This example shows how to create a simple mortgage amortization calculator web app. The example uses the simple calculator app from App Designer as a starting point. For information about the app and the numerical values you can enter, see App that Calculates and Plots Data Based on Numerical Input (MATLAB). In the workflow, you:
Package the simple calculator app from App Designer using the Web
App Compiler. This creates a web app archive
Deploy the web app by copying the web app archive
.ctf) file to the apps folder in the MATLAB® Web App Server.
Run the web app from the web apps home page.
Install and configure the MATLAB Web App Server.
Copy the App Designer file
your current working directory.
|Operating System||Default File Location|
deploytool at the MATLAB command line, and
choose Web App Compiler.
In the MAIN FILE section of the toolstrip,
click the button to add the
Mortgage.mlapp file to the project.
In the Archive information section, specify
the archive name as
Edit web app information in the Web app information section. Make sure to use a display name that is easy to distinguish when your web app is deployed to the server. This name is visible on the web apps home page.
Change the version number for tracking purposes (optional). The version number is visible on the web apps home page.
Add a description for your web app in the Summary field (optional). This description is visible on the web apps home page.
Click Package to package the app and create
a web app archive (
In the Save Project dialog box, specify the location to save the project.
In the Package dialog box, select Open output folder when process completes.
The Web App Compiler app creates a log file
PackagingLog.txt and two folders
for_testing that contain the web app archive
You can use the log file
see the exact
mcc syntax used to package and
create the web app.
Copy the web app archive file
Open the MATLAB Web App Server application, and click the Open App Folder button.
Paste the web app archive file
myMortgageWebApp.ctf in the folder that
Click the Open Home Page button.
This action opens the web apps home page using your default web browser. You see a tile displaying the simple mortgage calculator web app. Your web app is now deployed.
To run a web app, click the
The web app opens in a new tab.
Click the Monthly Payment button to get the monthly payment and the principal and interest graph.
You have successfully created, deployed, and run a web app.