How can I run MATLAB code from within a GitHub codespace?

조회 수: 4 (최근 30일)

I would like to use MATLAB within a GitHub codespace that I have created. Launching the codespace loads Visual Studio Code by default, so I thought to try using the MATLAB VS Code extension. However, I am not sure how to configure this.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 10월 18일
Because a GitHub codespace runs inside of a Docker container (called a dev container), any feature of the MATLAB VS Code extension that requires an installation of MATLAB (like code execution) is not supported. You are still able to use basic features of the extension when editing .m files in VS Code, like syntax highlighting and code folding.
If you want to use MATLAB within a GitHub codespace, we do provide some reference architecture that uses MATLAB's Docker image. This involves modifying "devcontainer.json", the configuration file of the docker container that the GitHub codespace runs in. The instructions are detailed in this MathWorks repository on GitHub.
In order to open MATLAB within your browser inside of your GitHub codespace, we recommend following the instructions listed within the "Using the MATLAB Image on Docker Hub and MATLAB Proxy" section of the README. This link from the README should directly configure a codespace with the correct "devcontainer.json" file.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Containers에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by