KAHIBARO Bookshelves
Discord Login Register

20.4. Add-Ons and MATLAB File Exchange

Installing Add-Ons from Within MATLAB

MATLAB can be extended with additional toolboxes, apps, and support packages called add-ons. You do not need to download files manually from a browser for most common extensions, because MATLAB includes an Add-On Explorer.

To open the Add-On Explorer, start from the MATLAB desktop and go to the Home tab in the toolstrip, then select the option that opens the add-ons browser. A separate window appears where you can search, browse by category, and manage installed items.

In the Add-On Explorer you can type keywords in the search box, select categories such as “Toolboxes,” “Apps,” or “Hardware Support,” and inspect each result. Each add-on has a detail page that usually includes a description, version information, screenshots, system requirements, and sometimes example code. For MathWorks products you will also see license information that indicates whether your license allows installation.

To install an add-on, select it and choose the install option. If you are not already signed in with a MathWorks account that is linked to your license, MATLAB prompts you to sign in. MATLAB then downloads and installs the files automatically and configures the MATLAB path so you can use the new features immediately. For some add-ons that interface with hardware or external software, an additional setup dialog may appear after installation that guides you through device drivers or configuration.

When an add-on is successfully installed, it appears in the Add-On Manager, also accessible from the Home tab. The Add-On Manager lists all installed add-ons, their versions, and their types, and allows you to view details, open documentation, or uninstall them. Installed apps often show up in the Apps tab, where you can launch them with one click. Installed toolboxes integrate by providing additional functions that become available in the command window and appear in the documentation.

Managing Installed Add-Ons

Once you begin using add-ons, it is important to know how to manage them. In the Add-On Manager you can view which items are installed for the current MATLAB release. If you work with multiple releases, each release maintains its own set of installed add-ons. The manager shows the status of each item and may indicate when an update is available.

To update an add-on, open its details from the manager when MATLAB indicates that a newer version exists. If your license covers the update and it is compatible with your release, you can install the new version directly. MATLAB replaces or supplements the older files as appropriate. Occasionally an update might change behavior or require a newer MATLAB version, so read the release notes on the detail page if you rely on a specific function.

If an add-on causes conflicts or you no longer need it, you can remove it using the uninstall option in the Add-On Manager. MATLAB then removes its files from the local installation and takes it off the MATLAB path. This helps keep your environment clean and reduces the chance that similarly named functions from different sources will collide.

When you suspect that a function is coming from an add-on, you can use the which command in the command window to see its location. If the path points into an add-ons folder or a folder created by a package name, you know that the behavior originates from that add-on. This is useful when debugging unexpected behavior after installing new functionality.

Accessing the MATLAB File Exchange

MATLAB File Exchange is an online platform where MathWorks and the user community share code, tools, examples, and complete applications. Many add-ons available through the Add-On Explorer originate from File Exchange entries. File Exchange is accessed through a web browser at the MathWorks website, and also partially integrated inside MATLAB through the Add-On Explorer.

On the web, File Exchange allows you to search for code by keyword, filter by category or MATLAB release, and sort results by relevance, popularity, or recent updates. Each submission has its own page that provides a description, version, required toolboxes, supported releases, screenshots, and often a quick start guide.

Most public submissions are shared as MATLAB project files, toolboxes, or simple collections of .m files. When a submission is packaged correctly, it is available from inside MATLAB as an installable add-on. In that case you can click an install or open in MATLAB button on the File Exchange web page, which launches MATLAB and opens the Add-On Explorer directly on that submission. From there, installation proceeds like any other add-on.

Downloading and Using File Exchange Submissions Locally

Some File Exchange entries are provided as zip archives of code instead of packaged add-ons. In such cases you download the file from the File Exchange web page in your browser, then unpack it on your computer. To use that code in MATLAB you need to place the unzipped folder somewhere convenient and add it to the MATLAB path.

You can add the folder temporarily with the addpath command, then call the functions as usual. If you want MATLAB to find these functions every time you start it, you can add the folder permanently through the path management tools in the desktop or by saving the path after using addpath. This manual approach gives more control, but does not integrate with the Add-On Manager and does not offer automatic updates.

When you download code in this manual way, pay attention to documentation that comes with the submission. Many authors include a README file or an example script that shows the intended usage and required inputs. Running example scripts is often the quickest way to test that everything is installed correctly.

Evaluating Quality and Compatibility on File Exchange

File Exchange content is a mix of official MathWorks offerings and community contributions. Official content is labeled accordingly and usually follows internal quality standards. Community submissions can be extremely useful, but their style, performance, and completeness vary.

To evaluate a submission, inspect its user ratings, number of downloads, and update history. A high rating and frequent updates can be a sign of active maintenance. Read the comments to see whether other users encountered problems with recent MATLAB releases. On the submission page look for a list of required toolboxes and supported release versions. If you rely on a specific release, confirm that it appears in the compatibility list.

Before using a new submission in an important project, try it in a simple test script. Confirm that functions behave as expected with small, known inputs. If the submission provides tests or example data, run those examples first. This extra step reduces the risk of subtle errors in your own work.

Sharing Your Own Code on File Exchange

When you are ready to share your own MATLAB code, you can create a File Exchange submission. Typically you first organize your files into a clean folder structure with clear names and minimal external dependencies. Include a main file or entry point and prepare help text using comments at the top of your functions or scripts. A short example script that demonstrates basic usage is also helpful.

On the MathWorks website you sign in with your MathWorks account and create a new submission. You upload your files, write a description that explains what the code does and why it is useful, and specify which MATLAB release you used and which toolboxes are required. After you publish the submission, other users can find it in search results and install it, either manually or through the Add-On Explorer if you package it as an add-on.

If users report issues or request features, you can update your submission by uploading a new version. The version history on the submission page helps others see what changed and which version they are using. This basic workflow allows you to contribute tools back to the MATLAB community and also makes it easier for you to reuse your own code across different machines.

Packaging Code as an Installable Add-On

To provide a smoother experience than a simple zip file, you can package your code as an installable add-on that works with the Add-On Explorer and Add-On Manager. MATLAB provides tools to create these packages so that others can install your work with a single click.

Packaging usually starts by collecting all necessary .m files, data files, and resources into a single folder or project structure. Within MATLAB you use packaging tools in the desktop environment to specify metadata such as the add-on name, version, author, and a brief description. For apps, you also designate an entry-point file that appears in the Apps tab after installation.

When your package is ready, MATLAB creates a single file that contains your code and metadata. You can upload this file as a File Exchange submission or share it directly with colleagues. When someone double-clicks such a package file or installs it from the Add-On Explorer, MATLAB performs the installation automatically, adds the code to the path, and registers apps or examples as specified by the package.

If you later improve your code, you repeat the packaging process with an incremented version number. Users who installed it through the Add-On Explorer can then see that an update is available, which encourages consistent and up to date use of your tools.

Important points to remember:

  1. Use the Add-On Explorer to search, install, update, and uninstall official and community add-ons without manual file handling.
  2. MATLAB File Exchange provides a large library of shared code. Always check compatibility, ratings, and documentation before using a submission.
  3. When you download code manually, unzip it into a folder and add that folder to the MATLAB path before calling its functions.
  4. The Add-On Manager shows all installed add-ons for the current release and helps you control what is active in your environment.
  5. You can share your own tools by organizing your code, creating a File Exchange submission, and optionally packaging it as an installable add-on.

Views: 0

Comments

Please login to add a comment.

Don't have an account? Register now!

Where to Move

Move chapter:

  • ☰ 1. Getting Started with MATLAB
    • ☰ 1.1. What Is MATLAB and What Is It Used For
      • ☰ 1.2. Installing MATLAB and Setting Up the Environment
        • ☰ 1.3. Understanding the MATLAB Desktop Interface
          • ☰ 1.4. Command Window, Workspace, and Current Folder
            • ☰ 1.5. Basic Workflow and Running Simple Commands
              • ☰ 1.6. Getting Help and Documentation
              • ☰ 2. MATLAB Language Basics
                • ☰ 2.1. MATLAB Syntax and Expressions
                  • ☰ 2.2. Variables and Assignment
                    • ☰ 2.3. Data Types and Type Conversion
                      • ☰ 2.4. Vectors and Matrices Fundamentals
                        • ☰ 2.5. Creating and Indexing Arrays
                          • ☰ 2.6. Basic Arithmetic and Elementwise Operations
                            • ☰ 2.7. Using Built-In Constants and Functions
                            • ☰ 3. Working with Variables and the Workspace
                              • ☰ 3.1. Creating, Viewing, and Editing Variables
                                • ☰ 3.2. Workspace Browser and Variable Inspector
                                  • ☰ 3.3. Saving and Loading Data Files
                                    • ☰ 3.4. MAT-Files and Importing External Data
                                      • ☰ 3.5. Clearing Variables and Managing the Workspace
                                      • ☰ 4. Vectors, Matrices, and Arrays
                                        • ☰ 4.1. Row and Column Vectors
                                          • ☰ 4.2. Matrix Creation and Concatenation
                                            • ☰ 4.3. Indexing, Slicing, and Logical Indexing
                                              • ☰ 4.4. Matrix Operations vs Elementwise Operations
                                                • ☰ 4.5. Reshaping and Rearranging Arrays
                                                  • ☰ 4.6. Special Matrices and Functions
                                                  • ☰ 5. Basic Programming Constructs
                                                    • ☰ 5.1. Scripts vs Functions
                                                      • ☰ 5.2. Control Flow with if, elseif, else
                                                        • ☰ 5.3. Loops with for and while
                                                          • ☰ 5.4. break, continue, and return
                                                            • ☰ 5.5. Logical Expressions and Relational Operators
                                                              • ☰ 5.6. Best Practices for Clear and Readable Code
                                                              • ☰ 6. Functions in MATLAB
                                                                • ☰ 6.1. Creating Simple Functions
                                                                  • ☰ 6.2. Function Inputs and Outputs
                                                                    • ☰ 6.3. Function Files and the Path
                                                                      • ☰ 6.4. Local vs Global Variables
                                                                        • ☰ 6.5. Anonymous Functions
                                                                          • ☰ 6.6. Organizing Code into Multiple Functions
                                                                          • ☰ 7. Working with Numbers and Math
                                                                            • ☰ 7.1. Scalars and Vectorized Computations
                                                                              • ☰ 7.2. Basic Mathematical Functions
                                                                                • ☰ 7.3. Trigonometric and Exponential Functions
                                                                                  • ☰ 7.4. Complex Numbers in MATLAB
                                                                                    • ☰ 7.5. Rounding, Modulo, and Special Values
                                                                                      • ☰ 7.6. Numerical Precision and Floating Point Considerations
                                                                                      • ☰ 8. Strings, Characters, and Categorical Data
                                                                                        • ☰ 8.1. Character Arrays and String Arrays
                                                                                          • ☰ 8.2. Creating and Manipulating Strings
                                                                                            • ☰ 8.3. Converting Between Data Types and Strings
                                                                                              • ☰ 8.4. Comparing and Searching Strings
                                                                                                • ☰ 8.5. Categorical Arrays Basics
                                                                                                • ☰ 9. Tables, Structures, and Cell Arrays
                                                                                                  • ☰ 9.1. Introduction to Tables
                                                                                                    • ☰ 9.2. Creating Tables and Accessing Data
                                                                                                      • ☰ 9.3. Modifying and Joining Tables
                                                                                                        • ☰ 9.4. Structures and Nested Structures
                                                                                                          • ☰ 9.5. Cell Arrays and Cell Indexing
                                                                                                            • ☰ 9.6. Choosing the Right Container Type
                                                                                                            • ☰ 10. Importing and Exporting Data
                                                                                                              • ☰ 10.1. Reading Text and CSV Files
                                                                                                                • ☰ 10.2. Importing Excel Spreadsheets
                                                                                                                  • ☰ 10.3. Importing Data with the Import Tool
                                                                                                                    • ☰ 10.4. Exporting Data to Files
                                                                                                                      • ☰ 10.5. Working with Image and Audio Files
                                                                                                                        • ☰ 10.6. Basic File Management from MATLAB
                                                                                                                        • ☰ 11. Plotting and Visualization
                                                                                                                          • ☰ 11.1. Introduction to 2D Plotting
                                                                                                                            • ☰ 11.2. Customizing Plots and Axes
                                                                                                                              • ☰ 11.3. Multiple Plots in One Figure
                                                                                                                                • ☰ 11.4. Labels, Titles, Legends, and Annotations
                                                                                                                                  • ☰ 11.5. Plotting with Different Line and Marker Styles
                                                                                                                                    • ☰ 11.6. Saving and Exporting Figures
                                                                                                                                    • ☰ 12. Advanced Plotting for Beginners
                                                                                                                                      • ☰ 12.1. Subplots and Tiled Layouts
                                                                                                                                        • ☰ 12.2. Bar, Scatter, and Stem Plots
                                                                                                                                          • ☰ 12.3. Histograms and Density Plots
                                                                                                                                            • ☰ 12.4. 3D Plots and Surface Plots
                                                                                                                                              • ☰ 12.5. Using plottools and Interactive Editing
                                                                                                                                                • ☰ 12.6. Basics of Handle Graphics
                                                                                                                                                • ☰ 13. Working with Scripts and Live Scripts
                                                                                                                                                  • ☰ 13.1. Creating and Running Script Files
                                                                                                                                                    • ☰ 13.2. Sectioning Code and Running Sections
                                                                                                                                                      • ☰ 13.3. Live Scripts and Rich Text
                                                                                                                                                        • ☰ 13.4. Adding Equations, Images, and Outputs
                                                                                                                                                          • ☰ 13.5. Sharing and Exporting Live Scripts
                                                                                                                                                          • ☰ 14. Debugging and Code Quality
                                                                                                                                                            • ☰ 14.1. Finding and Fixing Syntax Errors
                                                                                                                                                              • ☰ 14.2. Setting Breakpoints and Stepping Through Code
                                                                                                                                                                • ☰ 14.3. Inspecting Variable Values During Execution
                                                                                                                                                                  • ☰ 14.4. Using the Editor Debugging Tools
                                                                                                                                                                    • ☰ 14.5. Using Code Analyzer and Warnings
                                                                                                                                                                      • ☰ 14.6. Writing Clean and Maintainable MATLAB Code
                                                                                                                                                                      • ☰ 15. Basic Linear Algebra with MATLAB
                                                                                                                                                                        • ☰ 15.1. Vectors and Norms
                                                                                                                                                                          • ☰ 15.2. Matrix Addition and Multiplication
                                                                                                                                                                            • ☰ 15.3. Solving Linear Systems with Backslash
                                                                                                                                                                              • ☰ 15.4. Inverses, Determinants, and Rank
                                                                                                                                                                                • ☰ 15.5. Eigenvalues and Eigenvectors
                                                                                                                                                                                  • ☰ 15.6. Using Linear Algebra Functions Safely
                                                                                                                                                                                  • ☰ 16. Data Analysis and Statistics Fundamentals
                                                                                                                                                                                    • ☰ 16.1. Descriptive Statistics and Summary Measures
                                                                                                                                                                                      • ☰ 16.2. Sorting, Filtering, and Grouping Data
                                                                                                                                                                                        • ☰ 16.3. Basic Correlation and Regression
                                                                                                                                                                                          • ☰ 16.4. Simple Data Cleaning Techniques
                                                                                                                                                                                            • ☰ 16.5. Basic Time Series Handling
                                                                                                                                                                                            • ☰ 17. Working with Time and Dates
                                                                                                                                                                                              • ☰ 17.1. Representing Dates and Times
                                                                                                                                                                                                • ☰ 17.2. Creating and Formatting datetime Arrays
                                                                                                                                                                                                  • ☰ 17.3. Date Calculations and Differences
                                                                                                                                                                                                    • ☰ 17.4. Plotting Data over Time
                                                                                                                                                                                                    • ☰ 18. Introduction to Signal and Image Handling
                                                                                                                                                                                                      • ☰ 18.1. Basic Signal Representation in MATLAB
                                                                                                                                                                                                        • ☰ 18.2. Simple Filtering and Transformations
                                                                                                                                                                                                          • ☰ 18.3. Reading, Displaying, and Writing Images
                                                                                                                                                                                                            • ☰ 18.4. Basic Image Transformations
                                                                                                                                                                                                            • ☰ 19. Automation and Scripting Tasks
                                                                                                                                                                                                              • ☰ 19.1. Batch Processing of Files
                                                                                                                                                                                                                • ☰ 19.2. Writing Reusable Utility Scripts
                                                                                                                                                                                                                  • ☰ 19.3. Using Relative Paths and the MATLAB Path
                                                                                                                                                                                                                    • ☰ 19.4. Simple User Interaction with input and disp
                                                                                                                                                                                                                    • ☰ 20. Introduction to Toolboxes
                                                                                                                                                                                                                      • ☰ 20.1. What Are Toolboxes and How to Use Them
                                                                                                                                                                                                                        • ☰ 20.2. Exploring Installed Toolboxes
                                                                                                                                                                                                                          • ☰ 20.3. Finding Functions in Toolboxes
                                                                                                                                                                                                                            • ☰ 20.4. Add-Ons and MATLAB File Exchange
                                                                                                                                                                                                                            • ☰ 21. Best Practices and Next Steps
                                                                                                                                                                                                                              • ☰ 21.1. Organizing Projects and Folders
                                                                                                                                                                                                                                • ☰ 21.2. Version Control Basics with MATLAB
                                                                                                                                                                                                                                  • ☰ 21.3. Performance Tips for Beginners
                                                                                                                                                                                                                                    • ☰ 21.4. Learning Resources and Documentation Path
                                                                                                                                                                                                                                      • ☰ 21.5. Suggested Practice Projects for Beginners