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일

0 개 추천

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!

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 File Operations에 대해 자세히 알아보기

태그

질문:

2020년 2월 18일

댓글:

2023년 7월 28일

Community Treasure Hunt

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

Start Hunting!

Translated by