Getting Started With MATLAB Tutorials
Getting Started With MATLAB Tutorials
Tutorials
Desktop Basics
Matrices and Arrays
Array Indexing
Workspace Variables
Character Strings
Calling Functions
2-D and 3-D Plots
Programming and Scripts
Help and Documentation
Language Fundamentals
Entering CommandsBuild and run MATLAB statements
operations
Arithmetic
Addition, subtraction, multiplication, division, power, rounding
Relational Operations
Value comparisons
Logical Operations
True or false (Boolean) conditions
Set Operations
Unions, intersection, set membership
Bit-Wise Operations
Set, shift, or compare specific bit fields
ArithmeticAddition, subtraction, multiplication, division, power, rounding
Concepts
Array vs. Matrix Operations
Operator Precedence
Floating-Point Numbers
Integers
Relational OperationsValue comparisons
Concepts
Relational Operators
Operator Precedence
Logical OperationsTrue or false (Boolean) conditions
Start HereThe logical data type represents true or false states using the numbers 1 and 0, respectively.
Certain MATLAB functions and operators return logical values to indicate fulfillment of a condition. You
can use those logical values to index into an array or execute conditional code. For more information,
see how to Find Array Elements That Meet a Condition.
Examples and How To
Find Array Elements That Meet a Condition
Determine if Arrays Are Logical
Reduce Logical Arrays to Single Value
Concepts
Operator Precedence
Truth Table for Logical Operations
Related Information
Bit-Wise Operations
Relational Operations
Set OperationsUnions, intersection, set membership
Bit-Wise OperationsSet, shift, or compare specific bit fields
Special CharactersSymbols
Concepts
Special Values
Symbol Reference
Data TypesNumeric arrays, character arrays, tables, structures, and cell arrays; data type conversion
Start HereBy default, MATLAB stores all numeric variables as double-precision floating-point values.
Additional data types store text, integer or single-precision values, or a combination of related data in a
single variable. For more information , see Fundamental MATLAB Classes or watch Introducing MATLAB
Fundamental Classes (Data Types).
Numeric Types
Integer and floating-point data
Characters and Strings
Text in character arrays
Categorical Arrays
Arrays of qualitative data with values from a finite set of discrete, nonnumeric data
Tables
Arrays in tabular form whose named columns can have different types
Structures
Arrays with named fields that can contain data of varying types and sizes
Cell Arrays
Arrays that can contain data of varying types and sizes
Function Handles
Variables that allow you to invoke a function indirectly
Map Containers
Objects with keys that index to values, where keys need not be integers
Time Series
Data vectors sampled over time
Data Type Identification
Determining data type of a variable
Data Type Conversion
Converting between numeric arrays, character arrays, cell arrays, structures, or tables
Numeric TypesInteger and floating-point data
Examples and How To
Overview of Numeric Classes
Integers
Floating-Point Numbers
Complex Numbers
Infinity and NaN
Identifying Numeric Classes
Display Format for Numeric Values
Combining Unlike Integer Types
Combining Integer and Noninteger Data
Empty Matrices
Concatenation Examples
Characters and StringsText in character arrays
Create and Concatenate Strings
Store text in character arrays, combine character arrays
Parse Strings
Concepts
Carryover in Date Vectors and Strings
Troubleshooting
Troubleshooting: Converting Date Vector Returns Unexpected Output
Mathematics
Elementary MathTrigonometry, exponentials and logarithms, complex values, rounding,
Graphics
2-D and 3-D PlotsPlot continuous, discrete, surface, and volume data
Plotting Basics
Plot types, workflows
Line Plots
Linear, log-log, semi-log, error bar plots
Pie Charts, Bar Plots, and Histograms
Proportion and distribution of data
Start Here
MATLAB images are arrays of numeric data on which you can perform analysis. See Working with
Images in MATLAB Graphics.
Examples and How To
Read, Write, and Query Image Files
8-Bit and 16-Bit Images
Displaying Graphics Images
The Image Object and Its Properties
Printing Images
Convert Image Graphic or Data Type
Modifying ImagesImage type conversion, colormap modification
Concepts
Image Types
Printing and ExportingStandard file format print and export
Examples and How To
How to Print or Export
Printing and Exporting Use Cases
Changing a Figure's Settings
Choosing a Graphics Format
Choosing a Printer Driver
Saving Your Work
Troubleshooting
Concepts
Overview of Printing and Exporting
Graphics ObjectsGraphics objects, properties, and identification
Start Here
Manipulate graphics objects to create customized graphs. To understand the organization of graphics
objects, see Organization of Graphics Objects.
Graphics Object Identification
Find and manipulate graphics objects via their handles
Core Objects
Basic drawing primitives used by graphing functions
Annotation Objects
Graph annotation objects
Plot Objects
Property descriptions for plot objects
Group Objects
Group manipulation of objects
Figure Windows
Graphics window creation and identification
Axes Property Operations
Line styles, colors, colormaps, scaling, multiple axes
Object Property Operations
Object property query, set, and link operations
Graphics Object IdentificationFind and manipulate graphics objects via their handles
Examples and How To
Graphics Windows the Figure
Concepts
Conditional Statements
Loop Control Statements
ScriptsBasic program files
Examples and How To
Create Scripts
Add Comments to Programs
Run Code Sections
Document and Share Code Using Examples
Create a MATLAB Notebook with Microsoft Word
Concepts
Scripts vs. Functions
Options for Presenting Your Code
Publishing MATLAB Code
Publishing Markup
Output Preferences for Publishing
Related Information
Publishing Code from the Editor (5 min, 57 sec)
FunctionsPrograms that accept inputs and return outputs
Function Basics
Create functions, including anonymous, local, and nested functions
Input and Output Arguments
Support variable length argument lists, check arguments
Variables
Share data between functions or workspaces, generate valid variable names
Error Handling
Generate, catch, and respond to warnings and errors
Function BasicsCreate functions, including anonymous, local, and nested functions
Examples and How To
Create Functions in Files
Add Help for Your Program
Run Functions in the Editor
Concepts
Types of Functions
Anonymous Functions
Local Functions
Nested Functions
Private Functions
Function Precedence Order
Troubleshooting
Variables in Nested and Anonymous Functions
Related Information
Writing a MATLAB Program (4 min, 57 sec)
Input and Output ArgumentsSupport variable length argument lists, check arguments
Examples and How To
Find Number of Function Arguments
Support Variable Number of Inputs
Support Variable Number of Outputs
Validate Number of Function Arguments
Ignore Function Inputs
Check Function Inputs with validateattributes
Parse Function Inputs
Concepts
Argument Checking in Nested Functions
Input Parser Validation Functions
VariablesShare data between functions or workspaces, generate valid variable names
Examples and How To
Share Data Between Workspaces
Check Variable Scope in Editor
Concepts
Variable Names
Base and Function Workspaces
Error HandlingGenerate, catch, and respond to warnings and errors
Examples and How To
Issue Warnings and Errors
Suppress Warnings
Restore Warnings
Change How Warnings Display
Use try/catch to Handle Errors
Clean Up When Functions Complete
DebuggingDiagnose problems with MATLAB programs
Examples and How To
Ways to Debug MATLAB Files
Preparing for Debugging
Set Breakpoints
Run a File with Breakpoints
Step Through a File
Examine Values
Correct Problems and End Debugging
Conditional Breakpoints
Breakpoints in Anonymous Functions
Breakpoints in Methods That Overload Functions
Error Breakpoints
LEDs
Use the Raspberry Pi's LED
GPIO Pins
Use the Raspberry Pi's GPIO pins
Serial Port
Use the Raspberry Pi's serial port
I2C Interface
Use the Raspberry Pi's I2C interface
SPI Interface
Use the Raspberry Pi's SPI interface
Camera Board
Use the Raspberry Pi's add-on Camera Board
Linux
Use the Linux command shell and manage files on Raspberry Pi hardware
Install and Set Up Support for Raspberry Pi HardwareInstall and set up support for Raspberry Pi
hardware
How To
Install Support for Raspberry Pi Hardware
Open Interactive Examples
Create a Connection to Raspberry Pi HardwareCreate a connection to Raspberry Pi hardware
How To
Connect to Raspberry Pi Hardware
Concepts
Connecting to Raspberry Pi Hardware
Troubleshooting
Troubleshoot Connecting to Raspberry Pi Hardware
Get the IP Address of the Raspberry Pi Hardware
Guidelines for Entering Static IP Settings
LEDsUse the Raspberry Pi's LED
How To
Turn the Raspberry Pi LED On and Off
Flash the Raspberry Pi LED in Response to an Input
Concepts
The Raspberry Pi LED
GPIO PinsUse the Raspberry Pi's GPIO pins
How To
Use the Raspberry Pi GPIO Pins as Digital Inputs and Outputs
Concepts
The Raspberry Pi GPIO Pins
Troubleshooting
Troubleshoot Raspberry Pi GPIO Pins
Serial PortUse the Raspberry Pi's serial port
How To
Use the Raspberry Pi Serial Port to Connect to a Device
Concepts
The Raspberry Pi Serial Port
Troubleshooting
Troubleshoot the Raspberry Pi Serial Port
GUI Building
GUI Building BasicsGraphical user interface building techniques, terminology
Examples and How To
Create a Simple GUIDE GUI
Create a Simple Programmatic GUI
Concepts
What Is a GUI?
How Does a GUI Work?
Ways to Build MATLAB GUIs
Files Generated by GUIDE
Structure of a Programmatic GUI File
GUIDE Templates
GUIDE Tools Summary
GUIDE Preferences
GUIDE Options
GUI Design References
Related Information
Creating a GUI with GUIDE (10 min, 28 sec)
Component SelectionGUI elements such as buttons, menus, and dialog boxes
GUI Controls and Indicators
Buttons, boxes, sliders, and text
Menus and Toolbars
Menu items and tools at the top of a window
Predefined Dialog Boxes
Dialog boxes to report status, gather user input, and interact with operating system or printers
GUI Controls and IndicatorsButtons, boxes, sliders, and text
Examples and How To
Tools Workflow
Add Components to the GUIDE Layout Area
Programmatic Workflow
Create Figures for Programmatic GUIs
Add Components to a Programmatic GUI
Concepts
GUIDE Components
Programmatic Components
Menus and ToolbarsMenu items and tools at the top of a window
Examples and How To
Tools Workflow
Create Menus for GUIDE GUIs
Create Toolbars for GUIDE GUIs
Programmatic Workflow
Create Menus for Programmatic GUIs
Create Toolbars for Programmatic GUIs
Predefined Dialog BoxesDialog boxes to report status, gather user input, and interact with operating
system or printers
Component LayoutPosition, size, and alignment of components; text formatting
Examples and How To
Tools Workflow
Set the GUIDE GUI Size
Copy, Paste, and Arrange Components
Locate and Move Components
Resize GUIDE GUI Components
Align GUIDE GUI Components
Set Tab Order in a GUIDE GUI
View the GUIDE GUI Object Hierarchy
Design GUIDE GUIs for Cross-Platform Compatibility
Save a GUIDE GUI
Create a Programmatic GUI Code File from GUIDE GUI Files
Start Here
MATLAB apps help you solve common technical computing tasks interactively. Apps typically consist of
a graphical user interface (GUI), underlying code for performing the intended actions, associated data,
and other supporting files.
For information on locating apps you can use, see Find Apps.
How To
Find Apps
View App File List
Run, Uninstall, Reinstall, and Install Apps
Install Apps in a Shared Network Location
Change Apps Installation Folder
Concepts
MATLAB App Installer File mlappinstall
Start Here
Develop your application using object-oriented techniques with MATLAB. See Begin Using ObjectOriented Programming to get started.
Object-Oriented Design with MATLAB
Advantages of OOD with some basic MATLAB examples
Class Syntax Fundamentals
Quick reference guide to all syntax used to define MATLAB classes and class members, including
example classes
Defining MATLAB Classes
Detailed discussion of how to implement MATLAB classes
Getting Information About Classes and Objects
Class metadata provides information about classes and objects
Object-Oriented Design with MATLABAdvantages of OOD with some basic MATLAB examples
Examples and How To
Developing Classes Typical Workflow
Working with Objects in Functions
Class to Represent Structured Data
Class to Implement Linked Lists
Class for Graphing Functions
Class for Polynomials
Concepts
Why Use Object-Oriented Design
Classes in the MATLAB Language
Handle Objects
Comparing MATLAB with Other OO Languages
Class Diagram Notation
Related Information
Developing Classes Overview (10 min, 48 sec)
Class Syntax FundamentalsQuick reference guide to all syntax used to define MATLAB classes and
class members, including example classes
Examples and How To
Class Components
Classdef Block
Properties
Methods and Functions
Specifying Attributes
Class Files
Events and Listeners
Calling Superclass Methods on Subclass Objects
Representative Class Code
MATLAB Code Analyzer Warnings
Objects In Switch Statements
Using the Editor and Debugger with Classes
Modifying and Reloading Classes
Compatibility with Previous Versions
Defining MATLAB ClassesDetailed discussion of how to implement MATLAB classes
Class Definition and Organization
Class syntax, attributes, and organization
Properties
Property declaration, attributes, and access.
Methods
Method syntax, attributes, and purpose
Handle Classes
Objects that share references with other objects.
Events
Actions that broadcast notices to listeners
Object Arrays
Object array construction and concatenation
Class Hierarchies
Syntax and application of class hierarchies
Enumerations
Fixed set of names representing a single type of value
Control Save and Load
Customize the save and load process
Customize MATLAB Behavior
Implementing concatenation, indexing, and other standard behaviors
Custom Object Display
Customize how MATLAB displays objects in the command window
Class Definition and OrganizationClass syntax, attributes, and organization
Examples and How To
Class Definition
Class Attributes
Expressions in Class Definitions
Organizing Classes in Folders
Class Precedence
Packages Create Namespaces
Importing Classes
Concepts
User-Defined Classes
Getting Information About Classes and ObjectsClass metadata provides information about classes
and objects
Examples and How To
Class Metadata
Inspecting Class and Object Metadata
Finding Objects with Specific Values
Getting Information About Properties
Find Default Values in Property Metadata
Calling External FunctionsIn MATLAB, use functionality from other languages, such as Java,
.NET, and C
Call MEX-File Functions
Call C/C++ or Fortran MEX-file functions from MATLAB
Call C Shared Libraries
Directly call C library functions from MATLAB
Call Java Libraries
Access Java libraries from MATLAB
Call .NET Libraries
Access .NET libraries from MATLAB
Call COM Objects
Access COM components and ActiveX controls from MATLAB
Call Web Services
Communicate with Web services from MATLAB
Call MEX-File FunctionsCall C/C++ or Fortran MEX-file functions from MATLAB
Start Here
A MEX-file is a function, created in MATLAB, that calls a C, C++, or Fortran subroutine. To call a MEX-file,
use the name of the file, without the file extension. The MEX-file contains only one function or
subroutine, and its name is the MEX-file name. The file must be on your MATLAB path.
For information about creating MEX-files, see MEX-File Creation API.
Concepts
Using MEX-Files
MEX-File Placement
What You Need to Run a MEX-File You Receive from Someone Else
Troubleshooting
Version Compatibility
Platform Compatibility
Invalid MEX-File Error
Call C Shared LibrariesDirectly call C library functions from MATLAB
Examples and How To
Properties
Get and set .NET properties in MATLAB, special features of .NET properties
Methods
Use .NET methods in MATLAB, method signatures, arguments by reference, optional arguments
Events and Delegates
Use .NET event callbacks, create and call .NET delegates
Enumerations
Create and combine .NET enumerations in MATLAB
Generic Classes
Create .NET generic classes, invoke .NET generic methods in MATLAB
Getting StartedExamples and concepts to help you quickly get started using .NET in MATLAB.
Start Here
The Microsoft .NET Framework is a component that provides a large body of precoded solutions to
common program requirements. You can create instances of .NET classes and interact with .NET
applications from MATLAB. See Overview Using .NET from MATLAB.
Examples and How To
Access a Simple .NET Class
Load a Global .NET Assembly
Work with Microsoft Excel Spreadsheets Using .NET
Work with Microsoft Word Documents Using .NET
Build a .NET Application for MATLAB Examples
Simplify .NET Class Names
Nested Classes
Handle .NET Exceptions
Concepts
An Assembly is a Library of .NET Classes
Overview Using .NET from MATLAB
Using a .NET Object
.NET Terminology
Troubleshooting
Troubleshooting Security Policy Settings From Network Drives
Limitations to .NET Support
Data TypesData conversion, pass data between MATLAB and .NET
Examples and How To
Pass Numeric Arguments
Pass System.String Arguments
Pass System.Enum Arguments
Pass System.Nullable Arguments
Pass Cell Arrays of .NET Data
Pass Jagged Arrays
Convert Nested System.Object Arrays
Concepts
Passing Data to .NET Objects
Handling Data Returned from .NET Objects
Using Arrays with .NET Applications
PropertiesGet and set .NET properties in MATLAB, special features of .NET properties
Examples and How To
Set Static .NET Properties
MATLAB API for Other LanguagesInteract with MATLAB and MATLAB data types from other
language applications; write C/C++/Fortran functions to call from MATLAB (MEX-files)
MATLAB Engine API
Call MATLAB from C/C++ and Fortran programs
MATLAB COM Automation Server
Call MATLAB from COM components and applications
MAT-File API
Read and write MATLAB data from C/C++ and Fortran programs
MEX-File Creation API
Build MATLAB functions from C/C++ and Fortran functions
C/C++ Matrix Library API
Write C/C++ programs that work with the MATLAB mxArray data structure
Fortran Matrix Library API
Write Fortran programs that work with the MATLAB mxArray data structure
MATLAB Engine APICall MATLAB from C/C++ and Fortran programs
Examples and How To
Call MATLAB Functions from C and C++ Applications
Call MATLAB Functions from Fortran Applications
Build Windows Engine Application
Build Mac and Linux Engine Application
Attach to Existing MATLAB Sessions
Concepts
Introducing MATLAB Engine
What You Need to Build Engine Applications
Building Engine Applications on Windows Systems
Building Engine Applications on Mac and Linux Systems
Compiling Engine Applications with IDE
GUI-Intensive Applications
Troubleshooting
Can't Start MATLAB Engine
Debugging MATLAB Functions Used in Engine Applications
Related Information
MATLAB COM Automation Server
C/C++ Matrix Library API
Fortran Matrix Library API
MATLAB COM Automation ServerCall MATLAB from COM components and applications
Examples and How To
Call MATLAB Function from Visual Basic .NET Client
Call MATLAB Function from Web Application
Call MATLAB Function from C# Client
View MATLAB Functions from Visual Basic .NET Object Browser
Launch MATLAB as Automation Server in Desktop Mode
Manually Create Automation Server
Concepts
MATLAB COM Automation Server Interface
Creating the MATLAB Server
For information about writing Fortran MEX-files, see Fortran Source Files.
For information about using the loadlibrary and calllib commands to call functions in shared libraries,
see Call C Shared Libraries.
MEX-files are not appropriate for all applications. MATLAB is a high-productivity environment whose
specialty is eliminating time-consuming, low-level programming in compiled languages like C, C++, or
Fortran. In general, do your programming in MATLAB. Do not use MEX-files unless your application
requires it.
Examples and How To
Create C Source MEX-File
Table of MEX-File Source Code Files
Fill mxArray
Pass Structures and Cell Arrays
Create 2-D Cell Array
Handle 8-, 16-, and 32-Bit Data
Use C++ Features in MEX-Files
Call LAPACK and BLAS Functions
Use Help Files with MEX-Files
User Messages
Error Handling
Testing for Most-Derived Class
Upgrade MEX-Files to Use 64-Bit API
Concepts
Introducing MEX-Files
Components of MEX-File
MATLAB API Libraries
MATLAB Data
Data Flow in MEX-Files
Memory Management
Creating C++ MEX-Files
Handling Large mxArrays
Handling Large File I/O
Related Information
C/C++ Matrix Library API
MEX Library
MEX LibraryUse this library to perform operations in the MATLAB environment from C/C++ and Fortran
MEX-files
Executable C/C++ MEX-FilesBuild C/C++ subroutines into MATLAB functions
Start Here
To help you configure your system using a sample MEX-file, see Build MEX-File.
For information about writing a MEX-file, see Create C Source MEX-File.
Examples and How To
Build MEX-File
Concepts
What You Need to Build MEX-Files
Changing Default Compiler
Troubleshooting
Debugging on Microsoft Windows Platforms
Debugging on Mac Platforms
Desktop Environment
Startup and Shutdown
System Requirements
Acknowledgments
Tutorials
Access Symbolic Math Toolbox Functionality
Symbolic Objects
Create Symbolic Variables and Expressions
Perform Symbolic Computations
Assumptions on Symbolic Objects
Symbolic Computations in MATLAB
Symbolic variables, expressions, functions, conversions between symbolic and numeric
Symbolic Variables, Expressions, and Functions
Operators and Elementary Operations
Conversion Between Symbolic and Numeric
Mathematics
Graphics
Code Generation
Use symbolic results in MATLAB, Simulink, Simscape, C, Fortran, and LaTeX
MuPAD
Mathematics
Equation SolvingSolve algebraic and differential equations
Constants
Mathematical constants
Logarithms
Logarithms to commonly used bases
Trigonometric Functions
Sine, cosine, and related functions
Hyperbolic Functions
Hyperbolic sine, cosine, and related functions
Complex Numbers
Real and imaginary components, polar angle
Special Functions
Collection of special mathematical functions
ConstantsMathematical constants
LogarithmsLogarithms to commonly used bases
Examples and How To
Special Functions of Applied Mathematics
Trigonometric FunctionsSine, cosine, and related functions
Hyperbolic FunctionsHyperbolic sine, cosine, and related functions
Complex NumbersReal and imaginary components, polar angle
Special FunctionsCollection of special mathematical functions
Dirac and Heaviside Functions
Dirac, Heaviside, and step functions
Gamma Functions
Gamma and beta functions, binomial coefficients
Zeta Function and Polylogarithms
Zeta function, dilogarithm and polylogarithm functions
Airy and Bessel Functions
Airy and Bessel functions of the first and second kind
Graphics
Function PlotsPlot symbolic expressions, equations, and functions in 2-D and 3-D
Code Generation
Use symbolic results in MATLAB, Simulink, Simscape, C, Fortran,
and LaTeX
Examples and How To
Generate C or Fortran Code
Generate MATLAB Functions
Generate MATLAB Function Blocks
Generate Simscape Equations
MuPAD
Getting Started with MuPADExamples and concepts to help you quickly get started using
MuPAD
Examples and How To
Create MuPAD Notebooks
Save MuPAD Notebooks
Desktop Overview
Evaluate Mathematical Expressions and Commands
Quickly Access Standard MuPAD Functions
Access Help for Particular Command
Perform Computations
Use Graphics
Format and Export Documents and Graphics
Use Data Structures
Use the MuPAD Libraries
Programming Basics
Debug MuPAD Code Using the Debugger
Edit MuPAD Code in MATLAB Editor
Glossary
MuPAD Language FundamentalsSyntax, operators, data types, libraries, structures for data
storage
Entering Commands
Build and run MuPAD statements
Operators and Elementary Operations
Arithmetic, relational, logical, and set operations; precedence of operators
Special Values
FAIL, NIL, undefined, Boolean constants, special sets of numbers
Data Types
Structures for storing data, data type identification, and conversion to other data types
Symbols and Special Characters
Greek letters, subscript and superscript, special characters
Entering CommandsBuild and run MuPAD statements
Operators and Elementary OperationsArithmetic, relational, logical, and set operations; precedence
of operators
Arithmetic Operations
Addition, subtraction, multiplication, left and right division, power
Relational Operations
Equality, inequality, and other relational operations
Logical Operations
Logical and, or, xor, not, and other operations
Set Operations
Unions, intersections, set memberships
Expression Trees and Precedence
Precedence of operators in an expression, techniques to substitute parts of an expression
Arithmetic OperationsAddition, subtraction, multiplication, left and right division, power
Relational OperationsEquality, inequality, and other relational operations
Logical OperationsLogical and, or, xor, not, and other operations
Set OperationsUnions, intersections, set memberships
Expression Trees and PrecedencePrecedence of operators in an expression, techniques to substitute
parts of an expression
Examples and How To
Mathematical Expressions
Visualize Expression Trees
Modify Subexpressions
Concepts
The misc Library
Special Values
Z-Transform
Z-transform and its inverse
Fast Fourier Transform
Fast Fourier transform and its inverse
New Patterns for Transforms
Introduce new transform patterns, edit existing transform patterns
Fourier and Laplace TransformsFourier and Laplace transforms and their inverses
Examples and How To
Integral Transforms
Z-TransformZ-transform and its inverse
Examples and How To
Z-Transforms
Fast Fourier Transform
Fast Fourier transform and its inverse
Examples and How To
Discrete Fourier Transforms
Concepts
Numeric Algorithms Library
New Patterns for TransformsIntroduce new transform patterns, edit existing transform patterns
Examples and How To
Use Custom Patterns for Transforms
Properties and AssumptionsRestrict possible values of variables or expressions
Examples and How To
Use Permanent Assumptions
Use Temporary Assumptions
Concepts
Properties
When to Use Assumptions
Linear AlgebraMatrix analysis, linear equations, eigenvalues, singular values, matrix exponential,
factorization
Matrix and Vector Construction
Matrices, arrays, vectors, and special matrices
Matrix Operations and Transformations
Operations on rows and columns, scalar and vector products, transpose, and inverse
Matrix Analysis
Norm, determinant, condition, curl, divergence, gradient, and more
Vector Spaces and Subspaces
Matrix dimensions, rank, null space, reduced row echelon form
Eigenvalues and Eigenvectors
Eigenvalues, eigenvectors, Jordan normal form
Matrix Decomposition
Cholesky, LU, and QR factorizations, singular value decomposition, Jordan, Frobenius, Hermite, and
Smith forms of matrices
Linear Equations
Linear systems of equations in matrix form
Properties and Assumptions
Restrict possible values of variables or expressions
Matrix and Vector ConstructionMatrices, arrays, vectors, and special matrices
Examples and How To
Create Matrices
Create Vectors
Create Special Matrices
Access and Modify Matrix Elements
Create Matrices over Particular Rings
Concepts
Use Sparse and Dense Matrices
Linear Algebra Library
Matrix Operations and TransformationsOperations on rows and columns, scalar and vector
products, transpose, and inverse
Examples and How To
Compute with Matrices
Invert Matrices
Transpose Matrices
Swap and Delete Rows and Columns
Compute Matrix Exponentials
Concepts
Linear Algebra Library
Numeric Algorithms Library
Concepts
Linear Algebra Library
Numeric Algorithms Library
Groebner bases
Polynomial Creation
Create univariate and multivariate polynomials
Polynomial Manipulation
Division, factoring, decomposition, resultants, and subresultants
Elements of Polynomials
Coefficients, degrees and particular terms, monomials
Groebner Algebra
Ideals of multivariate polynomial rings over a field, Groebner bases of such ideals
Polynomial Roots
Symbolic and numeric approaches for finding polynomial roots
Properties and Assumptions
Restrict possible values of variables or expressions
Polynomial CreationCreate univariate and multivariate polynomials
Concepts
Orthogonal Polynomials
Polynomial ManipulationDivision, factoring, decomposition, resultants, and subresultants
Elements of Polynomials
Coefficients, degrees and particular terms, monomials
Groebner AlgebraIdeals of multivariate polynomial rings over a field, Groebner bases of such ideals
Concepts
Grbner bases
Polynomial RootsSymbolic and numeric approaches for finding polynomial roots
Examples and How To
Solve Equations Numerically
Concepts
Numeric Algorithms Library
Properties and AssumptionsRestrict possible values of variables or expressions
Examples and How To
Use Permanent Assumptions
Use Temporary Assumptions
Concepts
Properties
When to Use Assumptions
Mathematical Constants and FunctionsMathematical constants, complex numbers, logarithms,
exponential, trigonometric, hyperbolic, and special functions
Constants
Boolean constants, infinities, special sets of numbers
Complex Numbers
Real and imaginary components, absolute value, polar angle
Exponents and Logarithms
Operations on Numbers
Quotient and remainder, rounding numbers, real and imaginary components of complex numbers
Precision ControlControl over accuracy of numeric computations
Examples and How To
Compute with Numbers
Concepts
Floating-Point Arguments and Function Sensitivity
Operations on NumbersQuotient and remainder, rounding numbers, real and imaginary components
of complex numbers
Examples and How To
Compute with Numbers
Concepts
The misc Library
Numeric Algorithms Library
StatisticsAlgorithms and tools for organizing, analyzing, and modeling statistical data
Supported Distributions
Compute, fit, or generate samples
Data Import
Data import, data samples
Operations on Data Samples
Operate on rows and columns of data samples, sort samples, convert samples to lists
Descriptive Statistics
Measures of central tendency, dispersion, shape, and correlation
Statistical Visualization
View data patterns and trends
Regression Analysis
Linear and nonlinear regression
Hypothesis Testing
Goodness-of-fit tests such as Chi-square, Kolmogorov-Smirnov, Shapiro-Wilk, and t-test
Supported DistributionsCompute, fit, or generate samples
Cumulative Distribution Functions
Cumulative distribution function for continuous and discrete distributions
Probability Density Functions
Probability density function for continuous distributions
Probability Functions
Probability function for discrete distributions
Quantile Functions
Inverse cumulative distribution function for continuous and discrete distributions
Random Number Generators
Random number generator for continuous and discrete distributions
AnalysisCosts, weights, and numbers of edges and vertices, chromatic numbers and polynomials, and
other graph characteristics
CombinatoricsBell numbers, Catalan numbers, partitions and compositions of integers
Concepts
Combinatorics
Gallery
Easy Plotting: Graphs of Functions
Advanced Plotting: Principles and First Examples
Concepts
The Full Picture: Graphical Trees
Graphic Options Available in MuPAD
3-D Function PlotsPlot symbolic expressions, equations, and functions in 3-D
Examples and How To
Gallery
Easy Plotting: Graphs of Functions
Advanced Plotting: Principles and First Examples
Concepts
The Full Picture: Graphical Trees
Primitives
Turtle Graphics and L-SystemsCreate drawings via command sequence to an abstract robot
Examples and How To
Gallery
Concepts
The Full Picture: Graphical Trees
Primitives
Vector FieldsPlot vector fields and streamlines of vector fields
Examples and How To
Gallery
Advanced Plotting: Principles and First Examples
Concepts
The Full Picture: Graphical Trees
Primitives
AnimationsCreate animated graphics
Examples and How To
Create Animated Graphics
Animations
Combining PlotsCreate several plots in the same drawing area
Examples and How To
Layout of Canvas and Scenes
Groups of Primitives
Annotations and AppearanceAnnotations, colors, axis limits, appearance, and scaling, camera and
light positions
Colors
Colors, palettes, and patterns
3-D Scene Control
Positions of cameras and lights, focal points, light sources and intensity
Drawing Area
Legends, titles, dimensions and position of drawing area, comments and pictures in drawing area
Coordinate System
Appearance of axes, grid lines, and tick marks
Plot Style and Settings
Appearance of lines, points, surfaces, and arrows
Animation Settings
Style, timing, and visibility settings
Default Settings
Display or modify default settings of attributes
ColorsColors, palettes, and patterns
Concepts
Colors
3-D Scene ControlPositions of cameras and lights, focal points, light sources and intensity
Concepts
Cameras in 3D
Possible Strange Effects in 3D
Attributes
Drawing AreaLegends, titles, dimensions and position of drawing area, comments and pictures in
drawing area
Annotation
Fonts, legends, titles, text alignment
Layout
Height, width, margins, space between plots appearing in the same drawing area
External Pictures in MuPAD Plots
Display pictures not generated by MuPAD
AnnotationFonts, legends, titles, text alignment
Examples and How To
Fonts
Legends
Concepts
Attributes
LayoutHeight, width, margins, space between plots appearing in the same drawing area
Examples and How To
Layout of Canvas and Scenes
Concepts
Attributes
External Pictures in MuPAD PlotsDisplay pictures not generated by MuPAD
Examples and How To
Import Pictures
Coordinate SystemAppearance of axes, grid lines, and tick marks
Axes
Positions, decorations, titles, visibility
Grid Lines
Positions, color, width, style, visibility
Tick Marks
Positions, labels, visibility
AxesPositions, decorations, titles, visibility
Concepts
Attributes
Grid LinesPositions, color, width, style, visibility
Concepts
Attributes
Tick MarksPositions, labels, visibility
Concepts
Attributes
Data and File ManagementData import and export, file operations and locations
Data Import and Export
Import text and bitmap data, export data in STL format
File Operations
Interact with system files and folders, set paths
Operating System Commands
Interact with operating system from MuPAD
Data Import and ExportImport text and bitmap data, export data in STL format
Examples and How To
Import Data
Concepts
The import Library
Code Performance
Profile and improve performance
Memory Usage
Analyze and improve memory usage
Error Handling
Generate warnings and errors, capture data on cause of error
Testing and Code Verification
Write single tests and test scripts
Custom Functionality Integration
Seamless integration of new functions into MuPAD
Object-Oriented Programming
Object-oriented programming with MuPAD
Functional ProgrammingHigher-order functions and other utilities for functional programming
Examples and How To
Access Arguments of a Procedure
Test Arguments
Verify Options
Data Collection
Variables Inside Procedures
Utility Functions
Private Methods
Calls by Reference and Calls by Value
Concepts
Functional Programming
The misc Library
DebuggingDiagnose problems in MuPAD programs
Examples and How To
Debug MuPAD Code Using the Debugger
Debug MuPAD Code in the Tracing Mode
Edit MuPAD Code in MATLAB Editor
Display Progress
Use Assertions
Code PerformanceProfile and improve performance
Examples and How To
Measure Time
Profile Your Code
Concepts
When to Analyze Performance
Techniques for Improving Performance
Memory UsageAnalyze and improve memory usage
Examples and How To
Display Memory Usage
Remember Mechanism
History Mechanism
Error HandlingGenerate warnings and errors, capture data on cause of error
Examples and How To
Write Error and Warning Messages
Handle Errors
Testing and Code VerificationWrite single tests and test scripts
Examples and How To
Write Single Tests
Write Test Scripts
Code Verification
Concepts
Why Test Your Code
Code GenerationUse symbolic results in MATLAB, Simulink, Simscape, C, Fortran, TeX, and
MathML
Examples and How To
Create MATLAB Functions from MuPAD Expressions
Create MATLAB Function Blocks from MuPAD Expressions
Create Simscape Equations from MuPAD Expressions
Notebook InterfaceMuPAD notebook interface with embedded text, graphics, and typeset math
to document and manage computations performed in the MuPAD language
Typeset Math and Other Output Modes
Typeset, ASCII, or plain text math, abbreviations, line length
Keyboard Shortcuts
Key combinations to perform common tasks
Customizations and Preferences
Adjust MuPAD interfaces for your convenience
Presentations
Create class notes, textbooks, and interactive presentations embedding graphics, animations, and
descriptive text in MuPAD notebooks
Version
Information about current product version
Typeset Math and Other Output ModesTypeset, ASCII, or plain text math, abbreviations, line length
Examples and How To
Variables and Expressions ExchangeCopy variables and expressions along with their values
between MATLAB and MuPAD
Examples and How To
Copy Variables and Expressions Between MATLAB and MuPAD
Concepts
Reserved Variable and Function Names