Import files from a folder into Matlab and create a file list
조회 수: 3 (최근 30일)
이전 댓글 표시
Greetings. I face problem in extracting more than 1000 .json files from a folder into Matlab. I would like to create a filelist containing all the files in the folder and then go through each files and extract data from them, something like
filelist = {'d90f3c.json', '112.json', ..., 'acd.json' }
for i=1:length(filelist)
vals{i} = jsondecode(fileread(filelist{i}));
% Do some operations
end
Is there any way that I can have the "filelist" rather than making filelist by copying and pasting the name of each file from the folder which seems takes forever?
Thanks in advance!
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 JSON Format에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!