Matlab-Code-Run-for-VS-Code icon indicating copy to clipboard operation
Matlab-Code-Run-for-VS-Code copied to clipboard

Doesn't work when running the command second time

Open JerryWuZiJie opened this issue 4 years ago • 2 comments

The command works well for the first time I run it (after open vscode) and execute "matlab -nosplash -nodesktop -sd working/directory -r "run('filename');". But for the second time I run it, it is executing run('filename'), and the terminal is giving the following error:

run : The term 'run' is not recognized as the name of a cmdlet, function,  
script file, or operable program. Check the spelling of the name, or if a  
path was included, verify that the path is correct and try again.
At line:1 char:1
+ run('filename')
+ ~~~
    + CategoryInfo          : ObjectNotFound: (run:String) [], CommandNot  
   FoundException
    + FullyQualifiedErrorId : CommandNotFoundException

JerryWuZiJie avatar Sep 13 '21 21:09 JerryWuZiJie

I have this error too

Nikith-Kalu avatar Apr 10 '22 05:04 Nikith-Kalu

I have this error as well.

I have been getting around this by re-rerunning the initial command without the "-sd", it creates a new window but it runs.

amosquet avatar Feb 02 '24 20:02 amosquet