Why does dir .name output have two answers but numel reports only one element?
Show older comments
>> NoPtfolders.name
ans =
'1'
ans =
'2'
>> numel(NoPtfolders.name)
ans =
1
NoPtFolder is a 2x1 structure. What is NoPtFolders.name if not a 2x1 cell array? Why does numel report only one element?
(This result follows Walter Roberson's instruction to remove the current and parent directory listings.)
1 Comment
"What is NoPtFolders.name if not a 2x1 cell array?"
It is a comma-separated list. It is not one variable, and certainly not a cell array. Read more:
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands 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!