How to get all values from a struct ?
조회 수: 56 (최근 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!