필터 지우기
필터 지우기

How to merge two lists of files?

조회 수: 17 (최근 30일)
Tomaszzz
Tomaszzz 2022년 2월 25일
답변: Voss 2022년 2월 25일
Hi all,
I have two list of files (4x1 struct) likes this:
I would like the output to be the two lists merged in this way:
Can you help?

채택된 답변

Voss
Voss 2022년 2월 25일
list_1 = dir();
list_2 = dir();
combined_list = [list_1; list_2];
disp(list_1);
2×1 struct array with fields: name folder date bytes isdir datenum
disp(list_2);
2×1 struct array with fields: name folder date bytes isdir datenum
disp(combined_list);
4×1 struct array with fields: name folder date bytes isdir datenum

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by