Dir function gives nothing
显示 更早的评论
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 个评论
Stephen23
2019-11-16
Concatenating strings to create the filename is the problem.
Use fullfile instead, your code will work fine.
Zeynab Mousavikhamene
2019-11-16
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!