How to Open Script from Directory in Matlab

51 次查看(过去 30 天)
Hello,
I am new to Matlab, so I am wondering how to open a script in a directory in Matlab. The directory is on a server.
I tried typing the name of the script into the command line, but the directory Matlab is using does not match the directory where the script is. I tried typing in the full name of the script file, but that also did not work. I tried changing the directory that Matlab is using, but I could not find the one I need (since it is in terminal on a server).
If I'm in terminal on a server, how can I open a script in Matlab? Alternatively, how can I open the script in Matlab if it's on this server? Thank you!

回答(1 个)

Stephan
Stephan 2018-5-4
编辑:Stephan 2018-5-4
Hi,
when working in Matlab try this:
run('C:\Your Directory\subfolder\scriptname.m')
or
run('\\11.222.333.44\Server Directory\subfolder\scriptname.m')
related to this topic see also here:
and here:
if you want to use this path more often.
Best regards
Stephan

类别

Help CenterFile Exchange 中查找有关 Search Path 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by