readmatrix in a loop
조회 수: 12 (최근 30일)
이전 댓글 표시
i tried to use readmatrix in a loop to get data from specified files
for l=1:5
A=readmatrix(['File_' num2str(l) '.txt'])
end
it seems that A contains not all the data of the files but only of the last files!
I'll be thankfull for your advices!
댓글 수: 0
채택된 답변
David Hill
2021년 6월 1일
for l=1:5
A{l}=readmatrix(['File_' num2str(l) '.txt']);%not sure if all your data is the same size
end
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!