Main Content

Open in MATLAB Online from GitHub

You can open Git™ repositories directly in MATLAB® Online™ by creating specially formatted links. You can create a link to a Git repository, or to a project or file within a Git repository. Clicking the link creates a clone of the Git repository in MATLAB Online. If a project is specified, MATLAB opens and runs the project. If a file is specified, MATLAB opens the file.

After creating the links, share them by distributing them to others directly, or by creating Open in MATLAB Online buttons and including them in a Git README file.

Create Links

You can create links interactively or manually.


To create the link interactively, go to Create Links for MATLAB Online.


To create the link manually, copy the link template below. Then, replace the template parameters with the information for the repository, as described in the table below.<authorname>/<reponame>&file=<filename>&project=<projectname>&line=<linenumber>

To omit optional parameters, omit the parameter name and value, as well as the & character that precedes them. For example, this link template omits the project parameter.<authorname>/<reponame>&file=<filename>&line=<linenumber>


YesAuthor and name of the Git repositoryrepo=myname/myrepo


NoFile to be opened after the Git repository is clonedfile=filename.mlx


NoProject to be opened after the Git repository is clonedproject=MyProject.prj


NoLine to navigate to when specified file is openedline=88


Concurrent access of a Git repository in cloud storage might corrupt the repository.

Share Links

After you create a link, you can distribute it to others, for example, by including it in an email. You also can share the link by creating an Open in MATLAB Online button and including it in a Git README file. To create the button, copy the markdown template below, replacing the link parameter with the link that you created to open the repository in MATLAB Online.

[![Open in MATLAB Online](](<link>)
When you add the markdown to a Git README file, the file shows an Open in MATLAB Online button, as shown below.

Open in MATLAB Online button

Related Topics