Install MATLAB Copilot as add-on
MATLAB® Copilot now has MATLAB as a dependency and is an add-on product on the same license as MATLAB. To access MATLAB Copilot, you must now install the MATLAB Copilot add-on. Previously, if MATLAB Copilot was included with your license, you had access to MATLAB Copilot automatically when you signed in to your MathWorks® Account.
To install MATLAB Copilot, select it from the product selection list while installing MATLAB. If you already have MATLAB installed, install MATLAB Copilot from the Add-Ons panel. See Get and Manage Add-Ons.
Improved Explain Error responses
The Explain Error action now includes additional files within an error's stack trace as context in the Copilot Chat panel. Previously, Explain Error included only the file that initially triggered the error as context. The additional context improves explanations and recommendations for error recovery. The Copilot Chat panel includes as much of the stack trace as possible until it reaches its token limit.
For details on explaining errors, see Explain Code Using MATLAB Copilot.
View differences between modified and existing code without opening separate window
The Ask Copilot box in the MATLAB Editor now displays the differences between modified code and existing code. Previously, you had to open a separate window to view these differences. The Ask Copilot box also displays the name of the file, the line numbers selected for modification, and the number of lines of code added or removed. From this box, you can accept or discard the modified code, navigate between updated lines of code using the and buttons, toggle between viewing the differences or just the generated code using the button, and show the differences in a separate Comparison Tool window using the button.

For more details, see Modify Generated Code with MATLAB Copilot.
Perform Copilot actions inline in MATLAB Editor
In the MATLAB Editor, you can now perform context-specific actions by clicking the icon that appears to the left of the code. For example, if you select a block of code and click the icon, the context menu provides options to explain the code or generate comments for it.

If you put your cursor on the function definition line of a function file and click the icon, the context menu provides an option to generate help text for that file.

For additional ways to generate comments and explain code, see Generate and Modify Code Using MATLAB Copilot and Explain Code Using MATLAB Copilot.
Generate comments and explain code for entire MATLAB code file (.m) or live code file
(.mlx)
You can now use the Generate Comments and Explain
Code actions on all contents of a MATLAB code file (.m) or live code file (.mlx).
Previously, you had to select some code first. To perform these actions, place your cursor
anywhere in the file and then select Copilot > Generate Comments or Copilot > Explain Code on the Editor tab of the MATLAB Toolstrip.
For additional ways to generate comments and explain code, see Generate and Modify Code Using MATLAB Copilot and Explain Code Using MATLAB Copilot.
Disable automatic Copilot Chat context
If you have files open in the Editor or Live Editor, MATLAB Copilot automatically adds the current file as context in its Copilot Chat responses. You can now disable this automatic chat context.
For details, see Disable Automatic Copilot Chat Context.
LLM updated to GPT 5.4 (September 2026)
These MATLAB Copilot features use the GPT-5.4 mini or nano models as the underlying LLM:
Copilot Chat responses
Explain Code action
Explain Error action
Generate Comments action
Generate Help action
Generate Test action (MATLAB Test™)
Get Insights Using Copilot action
This update applies to all supported releases, starting with R2025a.
These features continue to use the GPT-5 mini model as the underlying LLM:
Explain Parfor action (Parallel Computing Toolbox™)
Training Advisor (Reinforcement Learning Designer)
Connect MATLAB Copilot to your LLM provider (September 2026)
You can connect MATLAB Copilot to private large language model (LLM) endpoints that are approved by your organization. For more information, see Connect MathWorks Copilot Products to Your LLM.