How to use .name?
64 次查看(过去 30 天)
显示 更早的评论
What does it mean when I write this line PicName = CylinderFile(1).name
It is extracting the picture/figure of the cylinder. when I run it, it says Index exceeds array bounds. for this line.
3 个评论
Stephen23
2018-10-16
编辑:Stephen23
2018-10-16
"You were right the structure returned by dir, and my question now about the parentheses it has 1 as a value. Should it have a name of the folder instead."
The structure returned by dir can be accessed using indexing, so what your code does is perfectly valud code: it accesses the first element of that structure. If there are no elements, then you will need to figure out why dir did not match anything.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 File Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!