How to get all values from a struct ?
61 次查看(过去 30 天)
显示 更早的评论
I used dir to get filenames. It is in a struct. Now how do I extract the values from that struct into a list ? Here is my attempt
im_filenames = dir('./JAAD_frames/video_0001/');
i = im_filenames.name[0:-1];
Expected one output from a curly brace or dot indexing expression, but there were 602 results.
0 个评论
采纳的回答
Image Analyst
2018-11-9
Try this:
filesStructure = dir('./JAAD_frames/video_0001/*.*')
allFileNames = {filesStructure(:).name}
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Structures 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!