How to get all values from a struct ?

56 Ansichten (letzte 30 Tage)
RuiQi
RuiQi am 9 Nov. 2018
Bearbeitet: RuiQi am 9 Nov. 2018
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.

Akzeptierte Antwort

Image Analyst
Image Analyst am 9 Nov. 2018
Try this:
filesStructure = dir('./JAAD_frames/video_0001/*.*')
allFileNames = {filesStructure(:).name}

Weitere Antworten (0)

Kategorien

Mehr zu Structures finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by