Matlab-Code-Run-for-VS-Code
Matlab-Code-Run-for-VS-Code copied to clipboard
Doesn't work when running the command second time
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
I have this error too
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.