Dir function gives nothing
Afficher commentaires plus anciens
I am using Dir function to find the specific files that have cell in their names but it retunrs nothing although cell files are existing in that folder. Here is the code:
selpath = uigetdir;
struct = dir([selpath '*cell*.json']);
and here is the sample image of the folder:

2 commentaires
Stephen23
le 16 Nov 2019
Concatenating strings to create the filename is the problem.
Use fullfile instead, your code will work fine.
Zeynab Mousavikhamene
le 16 Nov 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!