shinyypig / matlab-in-vscode

A vscode extension for matlab.
MIT License
45 stars 4 forks source link
extension matlab vscode

Matlab in VSCode

license installs version last_commit

This is a VSCode extension for Matlab. It provides the following features.

Major:

Minor:

All functions can be accessed by clicking the button in the menu bar. If matlab terminal is not started, the extension will start it automatically. Then, you need to reclick the button to run the command.

Click here to install the extension.

Usage

If you are a windows user, you may need to installed the MATLAB Engine API for Python, check this link for more details. Then you need to checkout the matlabPybackend option in the settings of the extension.

If you are a linux or mac user, the default settings are fine. Unless the matlab excuable file is not in the path, you can check the matlabCMD option in the settings of the extension.

View Workspace

You can click the button in the menu bar to open a webview to inspect the variables. Though it is not as powerful as the matlab workspace, it is enough for simple inspection.

Furthermore, you now can click the variable name to see the details of the variable.

Notice that a file named matlabInVSCodeVariableInfo.csv will be generated in the current directory. It is used to store the variable information. Normally, this file will be automatically deleted immediately. However, if some error occurs, it may not be deleted. You should delete it manually.

Important!!! You need to open a folder as workspace in the VSCode to make sure that the extension can find the matlabInVSCodeVariableInfo.csv file.

Cell Mode

You can split your code by %%, click the run cell button or simply press ctrl+enter (mac: cmd+enter) to run the active cell.

View Documentation

You can right click the function name and select Show Matlab Document to view the documentation of the function.

Settings

Change Log

See CHANGELOG.md.