dir(cd)

조회 수: 5 (최근 30일)
Ani Asoyan
Ani Asoyan 2020년 2월 18일
댓글: Stephen23 2023년 7월 28일
What does dir(cd) stand for?
files = dir(cd);
  댓글 수: 1
Stephen23
Stephen23 2023년 7월 28일
Note that the simpler approach call only one function, not two:
files = dir('.');

댓글을 달려면 로그인하십시오.

채택된 답변

Cristian Garcia Milan
Cristian Garcia Milan 2020년 5월 22일
dir is a function that takes a look in a determined folder (and subfolder if you command).
cd without arguments is your actual location
dir(cd) would bring you all the files in your actual location.
files = dir(cd);
Will return a struct with name of the file, folder,a boolean value about if it is a folder or not, and its modification date.
Hope it helps!
  댓글 수: 1
Ani Asoyan
Ani Asoyan 2020년 5월 26일
Thank you !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by