How to iterate through a struct ?
19 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How can i iterate through a struct in matlab ? Here is my code that does not work
im_filenames = dir('./JAAD_frames/video_0001/');
for name,foldername in im_filenames:
print(name, foldername)
0 commentaires
Réponses (2)
Image Analyst
le 9 Nov 2018
Try this:
filesStructure = dir('./JAAD_frames/video_0001/*.*')
allFileNames = {filesStructure(:).name}
for k = 1 : length(allFileNames)
fprintf('allFileNames{%d} = %s\n', k, allFileNames{k});
end
0 commentaires
Voir également
Catégories
En savoir plus sur Structures dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!