- cd runs the Matlab function cd and retrieves the current directory that Matlab is using
- !cd starts a shell from your operating system and runs its cd command (so the Windows command cd in your case)
cd command and !cd command give different path
3 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a problem on Matlab regarding cd and !cd command.
On Matlab, I choose a working folder which is in the following path:
C:\Temp
Typing cd command, I got:
C:\Temp
while, typing !cd, I got:
C:\Users
Thanks for the support.
0 个评论
回答(1 个)
Rik
2020-5-8
Those are two different situations
It isn't really obvious why those two would match. If you create a notepad.m function the results would be drastically different between notepad and !notepad.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!