Filter löschen
Filter löschen

dir(cd)

8 Ansichten (letzte 30 Tage)
Ani Asoyan
Ani Asoyan am 18 Feb. 2020
Kommentiert: Stephen23 am 28 Jul. 2023
What does dir(cd) stand for?
files = dir(cd);
  1 Kommentar
Stephen23
Stephen23 am 28 Jul. 2023
Note that the simpler approach call only one function, not two:
files = dir('.');

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Cristian Garcia Milan
Cristian Garcia Milan am 22 Mai 2020
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 Kommentar
Ani Asoyan
Ani Asoyan am 26 Mai 2020
Thank you !

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu File Operations finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by