How to get all values from a struct ?

56 ビュー (過去 30 日間)
RuiQi
RuiQi 2018 年 11 月 9 日
編集済み: RuiQi 2018 年 11 月 9 日
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.

採用された回答

Image Analyst
Image Analyst 2018 年 11 月 9 日
Try this:
filesStructure = dir('./JAAD_frames/video_0001/*.*')
allFileNames = {filesStructure(:).name}

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStructures についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by