{"id":23976124,"url":"https://github.com/shinyypig/matlab-in-vscode","last_synced_at":"2025-07-20T02:06:35.020Z","repository":{"id":165002534,"uuid":"617790610","full_name":"shinyypig/matlab-in-vscode","owner":"shinyypig","description":"A vscode extension for matlab.","archived":false,"fork":false,"pushed_at":"2025-03-12T12:13:37.000Z","size":2596,"stargazers_count":51,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T00:12:56.366Z","etag":null,"topics":["extension","matlab","vscode"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shinyypig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-23T05:38:55.000Z","updated_at":"2025-03-23T04:44:34.000Z","dependencies_parsed_at":"2024-11-04T07:34:18.567Z","dependency_job_id":null,"html_url":"https://github.com/shinyypig/matlab-in-vscode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fmatlab-in-vscode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fmatlab-in-vscode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fmatlab-in-vscode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shinyypig%2Fmatlab-in-vscode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shinyypig","download_url":"https://codeload.github.com/shinyypig/matlab-in-vscode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799956,"owners_count":21163404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","matlab","vscode"],"created_at":"2025-01-07T06:56:43.682Z","updated_at":"2025-04-14T00:13:04.756Z","avatar_url":"https://github.com/shinyypig.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Matlab in VSCode\n\n![license](https://img.shields.io/github/license/shinyypig/matlab-in-vscode)\n![installs](https://img.shields.io/visual-studio-marketplace/i/shinyypig.matlab-in-vscode)\n![version](https://img.shields.io/visual-studio-marketplace/v/shinyypig.matlab-in-vscode)\n![last_commit](https://img.shields.io/github/last-commit/shinyypig/matlab-in-vscode)\n\nThis is a VSCode extension for Matlab. It provides the following features.\n\nMajor:\n\n-   view variables directly in VSCode\n-   run a cell in matlab by press `ctrl+enter` or `cmd+enter`\n-   run current line and move to next in matlab by press `shift+enter`\n-   syntax highlighting for `.m` file\n\nMinor:\n\n-   run a complete matlab .m file\n-   interrupt matlab process by clicking the stop button\n-   change the work directory of matlab to the directory of the current file\n-   open the workspace of matlab to inspect the variables\n-   open the current file in matlab editor for debugging or other purpose\n\nAll 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.\n\n\u003cdiv align=center\u003e\n    \u003cimg width=50% style=margin:2% src=\"assets/2023-03-25-11-55-00.png\"\u003e\n\u003c/div\u003e\n\nClick [here](https://marketplace.visualstudio.com/items?itemName=shinyypig.matlab-in-vscode) to install the extension.\n\n## Usage\n\nIf you are a **windows** user, you may need to installed the MATLAB Engine API for Python, check this [link](https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html) for more details. Then you need to checkout the `matlabPybackend` option in the settings of the extension.\n\nIf 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.\n\n## View Workspace\n\nYou 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.\n\n\u003cdiv align=center\u003e\n    \u003cimg width=50% style=margin:2% src=\"assets/2023-06-25-20-16-14.png\"\u003e\n\u003c/div\u003e\n\nFurthermore, you now can click the variable name to see the details of the variable.\n\n\u003cdiv style=\"display: flex;justify-content: center; flex-wrap: wrap;\"\u003e\n    \u003cimg width=\"50%\" src=\"assets/iShot_2024-05-26_09.48.06.gif\" style=\"padding:10px;\"\u003e\n\u003c/div\u003e\n\nNotice 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.\n\n**Important!!!** You need to open a folder as workspace in the VSCode to make sure that the extension can find the `matlabInVSCodeVariableInfo.csv` file.\n\n## Cell Mode\n\nYou can split your code by `%%`, click the run cell button or simply press `ctrl+enter` (mac: `cmd+enter`) to run the active cell.\n\n\u003cdiv align=center\u003e\n    \u003cimg width=50% style=margin:2% src=\"assets/iShot_2023-03-25_11.52.16.gif\"\u003e\n\u003c/div\u003e\n\n## View Documentation\n\nYou can right click the function name and select `Show Matlab Document` to view the documentation of the function.\n\n\u003cdiv align=center\u003e\n    \u003cimg width=50% style=margin:2% src=\"assets/iShot_2024-05-26_09.47.00.gif\"\u003e\n\u003c/div\u003e\n\n## Settings\n\n-   `matlabCMD`: The command to start the Matlab terminal, default is `matlab -nodesktop -nosplash`. If the python backend is used, it will be ignored. In addition, for windows users, it is recommended to use `matlabPybackend`.\n-   `matlabMoveToNext`: If set to true, the cursor will move to the next line after running the current line. Default is true.\n-   `matlabPybackend`: It is recommended to use the python backend in Windows. Check this [link](https://www.mathworks.com/help/matlab/matlab_external/install-the-matlab-engine-for-python.html) for installing MATLAB Engine API for Python.\n-   `matlabPythonPath`: If you want to specify the python path, you can set it here.\n-   `matlabStartup`: the code to run after starting the matlab, default is empty, you can add some code to set the default figure style, for example:\n\n    ```json\n    \"matlab-in-vscode.matlabStartup\": [\n        \"addpath(genpath('./'));\",\n        \"set(groot, 'defaultLineLineWidth', 2);\",\n        \"set(groot, 'DefaultLineMarkerSize', 8);\",\n        \"set(groot, 'defaultAxesFontSize', 18);\",\n        \"set(groot, 'defaultAxesXGrid', 'on');\",\n        \"set(groot, 'defaultAxesYGrid', 'on');\",\n        \"set(groot, 'defaultAxesBox', 'on');\",\n        \"set(groot, 'defaultLegendBox', 'off');\",\n        \"format compact;\"\n    ],\n    ```\n\n## Change Log\n\nSee [CHANGELOG.md](CHANGELOG.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyypig%2Fmatlab-in-vscode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshinyypig%2Fmatlab-in-vscode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshinyypig%2Fmatlab-in-vscode/lists"}