Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Saving mutiple files as structs
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I am using the 'uipickfiles' function to select multiple .txt files and want to get data from those multiple files but its saved as a cell. Is there a way I can save them as an array? I want the same structs that come with 'dir', however, 'cell2struct' is not giving me those values. Is there psuedocode someone can show me? Thanks!
댓글 수: 0
답변 (1개)
A. Sawas
2019년 4월 6일
Asuming you get the files in cell array called "files", you can run the following loop to build the struct array "s_files" you want:
s_files = dir(files{1});
for i=2:length(files)
s_files = [s_files; dir(files{i})];
end
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!