dir(cd)

3 vues (au cours des 30 derniers jours)
Ani Asoyan
Ani Asoyan le 18 Fév 2020
Commenté : Stephen23 le 28 Juil 2023
What does dir(cd) stand for?
files = dir(cd);
  1 commentaire
Stephen23
Stephen23 le 28 Juil 2023
Note that the simpler approach call only one function, not two:
files = dir('.');

Connectez-vous pour commenter.

Réponse acceptée

Cristian Garcia Milan
Cristian Garcia Milan le 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 commentaire
Ani Asoyan
Ani Asoyan le 26 Mai 2020
Thank you !

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by