how to change directory?
4 次查看(过去 30 天)
显示 更早的评论
%this direc is default set to:-
direc ='C:\Program Files\Avast Software\Avast\1033'
macroDir = fullfile(direc,'CST_App Macros')
%at this point my directory is C:\Program Files\Avast Software\Avast\1033\CST_App Macros'
% how to save it to my directory
direc1 ='E:\MS FILE\101MSDCF DEC2014-17'
macroDir1 = fullfile(direc1,'CST_App Macros')
%and i want my directory to be E:\MS FILE\101MSDCF DEC2014-17\CST_App Macros'
2018a version
回答(1 个)
Siraj
2022-7-4
Hii,
It is my understanding that the variable "macroDir1" has the full path of the directory. Now if you want to switch your workspace to macroDir1 then you can use the "cd" command.
cd(macroDir1)
Hope it helps
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Search Path 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!