dir(cd)

3 次查看(过去 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
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 个)

类别

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