필터 지우기
필터 지우기

Using MATLAB on vscode that's installed with WSL?

조회 수: 125 (최근 30일)
Brandon
Brandon 2024년 2월 2일
답변: Shubham 2024년 2월 18일
Bit new to linux and WSL so I'm a little confused. I have vscode installed through wsl and ubuntu and MATLAB installed normally on my Windows11 pc. I got the MATLAB vscode extension and followed the setup guide to configure its install path which is through my 'program files' folder but I'm getting an error that "MATLAB was unable to start. If MATLAB is installed, confirm that the MATLAB executable path setting is properly configured."
Would I need to install MATLAB through linux for this to work? Or am I doing something wrong?
Thanks

답변 (1개)

Shubham
Shubham 2024년 2월 18일
Hi Brandon,
It seems that you have installed vscode in WSL and you are facing difficulties using the MATLAB vscode extension. If you have MATLAB installed on Windows, you will not be able to directly run it from within WSL because WSL and Windows have separate file systems and executable environments.
You can use MATLAB extension in vscode directly in Windows as follows:
For running MATLAB in WSL, you can try modifying the path for MATLAB executable in the configuration settings. You can access the file systems for windows in WSL by using “/mnt/ in the file path. For more information on working across file systems you can refer to the following:
Alternatively, you can install MATLAB directly in WSL for running it through vscode extension. Have a look at the following MATLAB Answer discussing the installation of MATLAB on WSL:
As a last resort, if you want to keep MATLAB installed on Windows and use it from VS Code running in WSL, you can set up a remote execution configuration. You can try referring to the following MATLAB Answer: https://www.mathworks.com/matlabcentral/answers/12159-how-to-use-matlab-remotly
I hope this helps!

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by