0% found this document useful (0 votes)
129 views65 pages

What's New in MATLAB

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views65 pages

What's New in MATLAB

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 65

What’s New in MATLAB

© 2020 The MathWorks, Inc.


1
Full details are available in the documentation release notes

▪ Filter results by:


– Category
– Release range
– Specific search terms

2
Code Compatibility Report

▪ Tool to help upgrade code to


latest and greatest

Link to documentation
▪ Identifies potential for updates
compatibility issues

▪ Hundreds of checks for


incompatibilities, errors,
warnings, and unsupported
functionality
Go directly to the
line of code

3
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

4
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

5
Editing and Running MATLAB Code Pre-16a

▪ Plain-text editing
▪ Output goes to
Command Window
▪ Multiple figure
windows appear
▪ Equations, images,
and hyperlinks only
appear if published

6
Use the Live Editor to create scripts that combine code,
output, and formatted text in an executable notebook.

7
Live Editor Notebook Features

▪ Divide code into sections

▪ View output next to the code

▪ Add rich text formatting, equations,


images, and hyperlinks

▪ Add interactive controls

▪ Enable animations in plots

▪ Save directly to PDF, HTML,


Word, and LaTeX

8
Live Editor Coding Features

▪ Use contextual hints when


calling functions

▪ Automatically generate code


when interacting with plots
and tables in the output

▪ Add Live Tasks to interactively


explore parameters and options

9
Live Editor Coding Features (continued)

▪ Debug live scripts and functions

▪ Select and edit rectangular


areas of code

▪ Refactor code into local or


external functions

▪ Create formatted function


reference documentation

10
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

11
Access data in many formats from many locations

▪ Type
Simulation

▪ Structure
Databases

▪ Location
Images

MDF Files

Custom

12
Access data interactively using the Import Tool

▪ Select data types

▪ Choose what to do
with missing data

▪ Generate MATLAB code

13
Access data from anywhere with minimal changes

Local disk

14
New functions for reading and writing data
parquetread parquetwrite
thingSpeakRead thingSpeakWrite
... ...

Access *read Explore and Discover *write Share


* = FROM * = TO
(file, source) (file, source)

read* write*
* = INTO * = OUT OF
(data type, format) (data type, format)

readtimetable writetimetable
readcell writecell
readmatrix writematrix
readstruct writestruct
... ...
15
New data types express more types of data naturally

Numeric

datetime duration
double, logical categorical
single,
… calendarDuration

Heterogeneous timetable

structure cell table

Text

{c|h}
string tall
char cell string 16
Preprocessing and analyzing data is easier than ever

17
New functions for common preprocessing tasks

▪ Synchronize by time
▪ Find, fill, and remove missing
▪ Work with outliers
▪ Smooth noisy data
▪ Normalize, rescale data

18
Live Editor tasks for preprocessing data and manipulating tables and timetables

▪ Tasks are apps that can be included in scripts

▪ Preprocessing tasks allow you to:


– Interactively explore parameters and options
– Preview results based on those parameters and options

▪ Additional tasks for interactively


manipulating tables and timetables

▪ Automatically generate the


corresponding MATLAB code

▪ Save the task as part of the script


for subsequent use by others

19
New functions for data analysis

▪ Explore range

▪ Grouped calculations

▪ Detect local minima


and maxima

▪ Detect abrupt changes


in data with ischange

20
New and Updated Visualizations

▪ New plotting functions


– Bubble charts
▪ bubblechart, bubblechart3, polarbubblechart
– swarmchart
– heatmap
– wordcloud
▪ MATLAB versions of toolbox functions
– boxchart
– scatterhistogram
– parallelplot
– stackedplot
▪ Updated dual-axes support (yyaxis)
▪ Geographic, plots
– geobubble, geoscatter, geodensity, etc.

21
tiledlayout is the new subplot

▪ Use tiledlayout and nexttile


to lay out a tiling of multiple
charts within a figure
– Nested layouts

▪ Configure aspects such as:​


• Shared decorations
(e.g. common title, x- and y-axis labels,
or a shared axes toolbar)
• Spacing between charts
• Resize behavior

22
Save As
Improved Support for Publishing Workflows
Copy as Image

Copy as Vector
▪ Interactively save or copy
contents of axes as image

▪ Programmatically save
and copy graphics

– exportgraphics function
– copygraphics function

▪ Capture and save an image of an app


– exportapp function

23
Datastores

▪ For:
– Handling collections of files
or large files

▪ Provides:
– Preview and configure I/O properties
– Read data into memory
(all at once, or incrementally)
– Transform data one file at a time for
data engineering workflows
– Combine with tall arrays to analyze
the entire out-of-memory dataset
with few code changes

24
Big Data Engineering and Analysis

Data Data
Engineering Analysis

datastores() datastores()
+ +
writeall() tall()

25
Simplify data engineering workflows with datastore and writeall

26
Big Data Engineering and Analysis

Data Data
Engineering Analysis

datastores() datastores()
+ +
writeall() tall()

27
tall Arrays

▪ New data type designed for data that doesn’t fit into memory

▪ Lots of observations (hence “tall”)

▪ Looks like a normal MATLAB array


– Supports numeric types, tables, datetimes, strings, etc…
– Supports several hundred functions for basic math, stats, indexing, etc.
– Statistics and Machine Learning Toolbox support
(clustering, classification, etc.)

28
tall Arrays Single
tall array Single
Machine Machine
Memory Process Memory

▪ Automatically breaks data up into


small “chunks” that fit in memory

▪ Tall arrays scan through the


dataset one “chunk” at a time

▪ Processing code for tall arrays is


the same as ordinary arrays

29
tall Arrays Single
tall array Single
Machine Machine
Memory Process Memory

▪ With Parallel Computing Toolbox,


process several “chunks” at once Single
Machine
Process Memory

▪ Can scale up to clusters with


MATLAB Parallel Server Single
Cluster of Machine
Machines Process Memory
Memory
▪ Support for Spark and Hadoop
Single
Machine
Process Memory

30
Big Data Analysis Without Big Changes
One file One hundred files

31
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

32
Profile Your Code to Improve Performance

▪ Measure and visualize


code performance

▪ Quickly drill down into


performance bottlenecks

33
Pause or Add Breakpoints During Code Evaluation

▪ Troubleshoot problems without specifying breakpoints in advance

– Pause execution of a program from the Editor

– Enter debug mode

– Resume program execution

34
Function Input and Class Property Validation

▪ Simplify input or property validation

35
Using MATLAB with Other Languages Start and stop Python
interpreter from
a MATLAB session
Calling Libraries Written in Another Language From MATLAB
Execute Python functions
• Java out of process
• Python
• C
Call C++ libraries directly
• C++ from MATLAB +
• Fortran
• COM components and ActiveX® controls
• RESTful, HTTP, and WSDL web services
Calling MATLAB from Another Language
• Java
• Python
• C/C++
• Fortran
• COM Automation server

36
Organize, manage, and share your code with MATLAB projects

▪ Configure your environment

▪ Analyze dependencies

▪ Track and control changes

▪ Package and share projects

37
Managing your code with Projects

1. Create project

38
Managing your code with Projects

1. Create project

2. Set path and startup tasks

39
Managing your code with Projects

1. Create project

2. Set path and startup tasks

3. Explore dependencies

40
Managing your code with Projects

▪ Function refactoring
across files in Projects

41
Managing your code with Projects

1. Create project

2. Set path and startup tasks

3. Explore dependencies

4. Label files
Identify and run tests
…on Continuous Integration servers

42
Managing your code with Projects

1. Create project

2. Set path and startup tasks

3. Explore dependencies

4. Label files

5. Integrate source control

43
Testing frameworks provide capabilities for creating,
running, and reporting on tests for your code
▪ MATLAB Unit Testing Framework
– Includes script-, function-,
and class-based testing
– Works with continuous integration servers

▪ Performance Testing Framework


– Time MATLAB code automatically
– Track performance over time

▪ App Testing Framework


– Author automated test for App Designer apps

44
Automated Testing – Jenkins plugin

▪ Easily connect and configure


MATLAB with Jenkins

▪ Schedule automatic code


execution and testing:
– based on time of day
– whenever new code changes
are committed

45
Automated Testing – Jenkins plugin – Testing reports

▪ View testing results

▪ View code coverage

▪ View testing reports

46
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

47
App Designer is the recommended environment for
creating desktop and web apps in MATLAB

GUIDE to App Designer


Migration Tool
Available via Add-On Explorer

48
Interactively lay out your app in the App Designer design canvas

▪ Drag and drop components

▪ Use alignment hints to


get a precise layout

▪ Create apps that automatically


adjust size, location, and
visibility of app content

▪ App Designer automatically generates


the object-oriented code that specifies
the app’s layout and design

49
Use the app testing framework to write tests that programmatically
perform gestures on a UI component

testCase.press(myApp.checkbox)

testCase.choose(myApp.discreteKnob, "Medium")

testCase.drag(myApp.continuousKnob, 10, 90)

testCase.type(myApp.editfield, myTextVar)

50
Diff and Merge App Designer Apps

▪ Use the Comparison Tool to:

– Find differences in the


code of two apps

– Merge changes in callback


and utility functions

MATLAB

51
Share Apps with Other MATLAB Users

▪ Directly as MATLAB files


– .mlapp file
– Manually provide other supporting
files (data, other code files)

▪ As a packaged app
– .mlappinstall file
– Installed apps appear in the Apps
tab in the MATLAB toolstrip

▪ Through MATLAB Online and MATLAB Drive


– Others can both run and collaborate
on the design of the app

52
Add-Ons Extend the Capabilities of MATLAB

▪ Create and share custom toolboxes


– Package as a single installer file
– Can include code, data, apps,
examples, documentation

▪ Add-On Explorer
– Find and install add-ons
– Includes MathWorks + community content

▪ Add-On Manager
– View and manage installed add-ons*

* Programmatically manage add-ons by name starting in R2019b


53
Access MATLAB through your browser with MATLAB Online

▪ Use the latest version of MATLAB

▪ No downloads, installations, configurations


or maintenance required

▪ Share your work with a unique URL

▪ Collaborate with others by setting permissions

▪ All named academic, commercial and


home user accounts are eligible New in
▪ App Designer in MATLAB Online
▪ Single Sign-On with MathWorks.com
54
Create Standalone Desktop and Web Apps

▪ Create standalone applications

▪ Package apps as web apps


– Share via a unique URL
– Access directly from a browser

55
Agenda

▪ Desktop & Live Editor

▪ Data Analysis & Visualization

▪ Language & Programming

▪ App Building & Sharing

▪ Toolbox Updates

56
Support for the Latest Wireless Standards
Simulate, analyze and test 5G uplink and downlink
radio links. Generate IEEE 802.11ax/ad and LTE NB-
5G Toolbox
IoT, LTE-M, D2D, and C-V2X compliant waveforms

▪ 5G Toolbox: A new product for simulating, analyzing, and


testing the physical layer of 5G communication systems +

▪ IEEE 802.11ax and 802.11ad are new Wi-Fi standards


intended for high data rate communications +

▪ NB-IoT and LTE-M are machine-to-machine (M2M) WLAN Toolbox


applications for the Internet-of-Things (IoT) +

▪ D2D and C-V2X are LTE application for device-to-device


and cellular vehicular communications

LTE Toolbox
57
Optimization

▪ Generate C-code* for different problem types


– Nonlinear problems (fmincon) (19b)
– Quadratic problems (quadprog) (20a)
– Nonlinear least squares and systems
of nonlinear equations (20b)

▪ Solve optimization problems interactively


using the Optimize Live Editor task

▪ Automatically calculate and use gradients


of objective and constraint expressions

* Requires MATLAB Coder


58
Machine Learning “I would have never attempted machine
learning if this app was not available.”
MATLAB makes machine learning easy
and accessible for everyone, even if
you’re not an expert

▪ Use apps to interactively explore data, choose


algorithms to train and validate models, and
compare results
– Classification Learner app
– Regression Learner app

▪ Automated Machine Learning (AutoML)


– Automatically select the best model
and associated hyperparameters for
classification and regression
(fitcauto, fitrauto)

59
Machine Learning

▪ Interpretability: Obtain local


interpretable model-agnostic
explanations (LIME)

▪ Simulate and generate code for


support vector machine (SVM)
models in Simulink

60
Deep Learning
Data preparation, design, simulation, and deployment for deep neural networks

▪ Create, modify, and analyze deep learning


architectures using apps and visualization tools

▪ Preprocess data and automate ground-truth labeling


of image, video, and audio data using apps

▪ Collaborate with peers using frameworks like


TensorFlow, PyTorch, and MxNet

▪ Accelerate training on NVIDIA GPUs, cloud, and datacenter


resources without specialized programming

▪ Simulate and train dynamic system behavior with reinforcement learning

▪ Automatically generate high-performance C, C++, and CUDA code for inference

https://www.mathworks.com/solutions/deep-learning.html 61
Experiment Manager App

▪ Manage multiple experiments


▪ Keep track of parameters
▪ Analyze and compare results

62
Prototype and deploy deep learning networks on FPGAs and SoCs

▪ Run deep learning inferencing on


FPGAs directly from MATLAB
Application
logic

▪ Use pre-built bitstreams for running on


supported Xilinx and Intel devices

Deep Learning HDL Toolbox 63


New Products
▪ AI, Data Science, and Statistics ▪ Code Generation ▪ RF and Mixed Signal
– Deep Learning HDL Toolbox (20b) – GPU Coder (17b) – Antenna Toolbox (16a)
– Reinforcement Learning Toolbox (19a) ▪ Computational Finance ▪ Signal Processing
– Predictive Maintenance Toolbox (18a) – Risk Management Toolbox (16b) – Audio Toolbox (16a)
– Text Analytics Toolbox (17b) ▪ Control Systems ▪ Verification, Validation, and Test
▪ Application Deployment – Motor Control Blockset (20a) – Simulink Check (17b)
– MATLAB Web App Server (20a) – Reinforcement Learning Toolbox (19a) – Simulink Coverage (17b)
– Simulink Compiler (20a) – Predictive Maintenance Toolbox (18a) – Simulink Requirements (17b)
▪ Autonomous Systems ▪ FPGA, ASIC, and SoC Development – Simulink Test (15a)
– UAV Toolbox (20b) – Deep Learning HDL Toolbox (20b) ▪ Wireless Communications
– RoadRunner (20b) – Wireless HDL Toolbox (17b) – 5G Toolbox (18b)
– RoadRunner Asset Library (20b) – Vision HDL Toolbox (15a) – WLAN Toolbox (15b+)
– RoadRunner Scene Builder (20b) ▪ Image Processing and Computer Vision
– Navigation Toolbox (19b) – Lidar Toolbox (20b)
– ROS Toolbox (19b)
▪ Physical Modeling
– Sensor Fusion and Tracking Toolbox
– Simcape Electrical (formerly SimPowerSystems and SimElectronics) (18b)
(18b)
– Simscape Fluids (formerly SimHydraulics) (16a)
– Automated Driving Toolbox (17a)
– Simscape Multibody (formerly SimMechanics) (16a)
– Robotics System Toolbox (15a)
64
© 2020 The MathWorks, Inc.
65

You might also like