-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Matlab Does Not Run Codes on Visual Studio Code #147
Comments
Hello, I was unable to reproduce this on my side, so I had a few quick questions: Can you please send me the full path of the file you are trying to run? After you receive the error above can you try the following: And finally, if you manually add the file to the path by running ">> addpath('<directory where file resides')", does the run button work for that session? Thanks! |
I can share a simpler code. my directory is /Users/seckinpolat/Documents/MATLAB my code is trial.m close all After I run it
When I tried to write your on VS I received the following error
When I run the same line on my Matlab command line
When I manually enter addpath('/Users/seckinpolat/Documents/MATLAB/trial.m') I received this following error on VS >> addpath('/Users/seckinpolat/Documents/MATLAB/trial.m')
Thanks! |
Can you please try that last step again just the directory:
|
I run the lines that you sent me and I got the exact same errors
|
It seems the second time did return a slightly different error of "Directory access failure". In the meantime, the one thing I would like to see is if you can run a script from a different folder not under your "Documents" folder. Additionally, what happens if you run ">> cd('/Users/seckinpolat/Documents/MATLAB/')"? Thanks for the help! |
Hello seckinpolat, In addition to what I mentioned above, I have a few more questions that would really help us figure this out.
Feel free to redact the results. We are more interested in whether they error out or if they work.
From what you have said, I expect those to work. Thanks again for your help! |
Describe the bug
I have Visual Studio Code Version: 1.89.1 with Matlab extension v1.2.2, I have Matlab R2024a.
Everything seems working but when I try to run a Matlab code in Visual Studio code, it gives me notification that "File is not found in the current folder or on the MATLAB path" after I click on "Add to Path" then I receive Unrecognized function or variable on terminal.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected matlab code be running and generating plots and results.
Screenshots
Useful Information
Thank you for your help in advance.
The text was updated successfully, but these errors were encountered: