2
Application Deployment with MATLAB
Group Members
Suppliers
Clients
Collaborators
MATLAB
Author
Organization
3
Te
st &
Ve
rifica
tion
Implementation
Research & Design
Explore and discover
Gain insight into problem
Evaluate options, trade-offs
Test
Design
Elaborate
Application Deployment Process
Requirements
Embedded software and
digital electronics
Algorithms and Applications
for Desktop or Web
MATLAB Excel .NET C/C++
Java .dll .exe
Verilog FPGA PLC C/C++
VHDL PAC
4
Modeling Global Solar Radiation
𝑅𝑠 = 𝑎 (1 + 𝑏𝐻)(1 − 𝑒−𝑐 ∆𝑇𝑛)
Rs: Solar Ratio (global solar radiation/ extraterrestrial solar radiation)
H: Relative humidity
∆𝑇: TDailyMax – TDailyMin
a,b,c,n: Model coefficients
Value of extraterrestrial solar
radiation is calculated for a
given day-of-year and latitude
using a known formula
Daily temperature variations are largely
driven by solar radiation received at the surface
extraterrestrial
radiation
total global
radiation
6
Packaging and Sharing MATLAB Apps
MATLAB apps
– Interactive applications to perform
technical computing tasks
– Displayed in apps gallery
Included in many MATLAB products
Package your own app
– Create single file for distribution
and installation into gallery
– Packaging tool:
Automatically includes all necessary files
Documents required products
7
MATLAB Desktop
End-User Machine
1
2
3
Toolboxes
Deploying Applications with MATLAB
MATLAB Compiler
.exe .exe
9
3
Deploying MATLAB Components
Create MATLAB application
Build component
– MATLAB Compiler™
– MATLAB Builder™ JA
– MATLAB Builder™ NE
Deploy against MATLAB
Compiler Runtime (MCR)
– One per process
– Loaded in-process
– Single threaded
– Thread safe
MATLAB
Component
MATLAB Builder JA
MATLAB Builder NE
MATLAB Compiler 2
Toolboxes 1
11
MATLAB Production Server™
Directly deploy MATLAB programs into production
– Centrally manage multiple MATLAB programs & MCR versions
– Automatically deploy updates without server restarts
Scalable & reliable
– Service large numbers of concurrent requests
– Add capacity or redundancy with additional servers
Use with web, database & application servers
– Lightweight client library isolates MATLAB processing
– Access MATLAB programs using native data types
MATLAB Production Server(s)
HTML
XML
Java Script Web
Server(s)
12
What is MATLAB Production Server?
Enterprise class framework for running packaged MATLAB programs
Server software
– Manages packaged MATLAB programs & worker pool
Runtime libraries
– MATLAB Compiler™ Runtime (MCR)
Lightweight client library (for .NET & Java)
– Request MATLAB programs (functions)
.NET
MATLAB Production Server
Request
Broker
&
Program
Manager
13
MATLAB Production Server - Example
Web
Server
Application
Server
Database/Historian Server
Energy
Pricing
Predictive
Analytics
Asset
Monitoring
MATLAB Production Server
MATLAB
Compiler
Web Applications
- web browser
- web services
Desktop Applications
- custom applications
- standard (Excel)
Batch Applications
18
Java Excel .NET Web
Deploying Algorithms and Applications
Give MATLAB code
to other users – MATLAB apps
– MATLAB files
Share applications
with end users who
do not need MATLAB
– Stand-alone
executables
– Shared libraries
– Software components
.exe .dll
.lib
MATLAB Compiler
MATLAB Builder NE
MATLAB Builder EX
MATLAB Builder JA
Royalty-free distribution
19 © 2013 The MathWorks, Inc.
MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See www.mathworks.com/trademarks for a list of additional trademarks.
Other product or brand names may be trademarks or registered trademarks of their respective holders.”