How can fix the Error using dir Function is not defined for 'cell' inputs?
5 views (last 30 days)
Show older comments
rootpath = {};
D = dir(rootpath);
1 Comment
Accepted Answer
Guillaume
on 25 Feb 2016
The fix is simple, don't pass a cell (an empty one at that) to dir.
It's not clear what you're trying to do. rootpath must be a string that points to a valid path on your machine. Maybe,
rootpath = 'C:\';
but only you know what it should really be.
0 Comments
More Answers (0)
See Also
Categories
Find more on File Operations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!