Set Up MATLAB Copilot

MATLAB® Copilot provides generative AI–powered capabilities specifically for the MATLAB desktop environment. With MATLAB Copilot, you can ask questions, generate code, and get explanations for selected code and error messages. Responses in the Copilot Chat panel are grounded by relevant MathWorks® documentation and code examples.

There are several ways to use MATLAB Copilot capabilities:

  • To chat with MATLAB Copilot, use the Copilot Chat panel. Copilot Chat is an interactive assistant that can help you explore ideas and express them in code. Its responses can include both conversational text and generated code.

  • To perform common tasks such as explaining code and errors or generating comments, use Copilot actions. You can access Copilot actions from menus in the Editor, Live Editor, and Command Window.

  • To generate or modify code in the Editor, Live Editor, or Command Window, open an Ask Copilot text box. Describe the code you want. Then accept or discard the generated code directly in your code file or in the Command Window.

  • To get code suggestions from MATLAB Copilot as you type in the Editor or Live Editor, use Copilot autocompletions. Instead of responding to prompts, MATLAB Copilot generates code based on the code and comments in your file.

Sign In as Licensed User

To use MATLAB Copilot, you must have a MATLAB Copilot license. Unlike other MathWorks products, there is no toolbox or app to download and install for MATLAB Copilot. Instead, you gain access to MATLAB Copilot as a licensed user through your MathWorks Account.

First, sign in to your MathWorks Account using the Sign In button at the upper right corner of MATLAB.

  • If you already have a license for MATLAB Copilot, then several MATLAB Copilot features appear at startup. The  symbol indicates ways that you can interact with MATLAB Copilot.

  • If you do not have a license for MATLAB Copilot, then contact your license administrator. Or, if you do not have a license for MathWorks products through an organization, you can buy a license or request a trial from the MathWorks Store.

Start and Chat with Copilot

When you start MATLAB, several MATLAB Copilot features appear:

  • Copilot Chat panel on the right.

  • Copilot Chat button on the MATLAB Toolstrip. To open the Copilot Chat panel, click the button.

  • Copilot Chat icon on the right sidebar. To open and close the Copilot Chat panel, click the icon.

  • Ctrl+Shift+P help text in the Command Window.

  • Copilot status indicator on the lower left corner. It indicates if Copilot is enabled or busy with a request. It also provides access to Copilot Settings.