필터 지우기
필터 지우기

How can I close the currently open directory in matlab

조회 수: 15 (최근 30일)
Meenal
Meenal 2022년 9월 15일
답변: Chunru 2022년 9월 15일
Hello,
I want to close the currently open directory in matlab
cd('C:\folder1\new1');
I want to close the above opened directory.
Thanks in Advance

답변 (1개)

Chunru
Chunru 2022년 9월 15일
% You change directory rather than close directory
% We make two directories here for example
mkdir dir1/dir1_1
mkdir dir2
% remember the current directory
cdir = pwd;
cd dir1
% do whatever in this directory
ls
dir1_1
% Now change back to the original directory
cd(cdir)
pwd
ans = '/users/mss.system.MazITe'
ls
dir1 dir2

카테고리

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