How to loop multiple text files with different filenames ?
이전 댓글 표시
Hello,
I have multiple text files with different filenames like x001.txt, where x is varying from a-d. I have imported all the files. How to i loop them for reading the data from each of the text file. Thanks.
댓글 수: 4
madhan ravi
2019년 3월 8일
doc sprintf
Prajwal Kadlaplamutt Ravindra Kumar
2019년 3월 8일
Mansa Murthy
2019년 3월 8일
Hi..how to save extracted features of 100 images in one .mat file?
i want to save all the values (homogenity,contrast,energy) of 100 images in one .mat file?
답변 (1개)
KSSV
2019년 3월 8일
files = dir('*.txt') ;
N = length(files) ;
for i = 1:N
thisfile = files(i).txt ;
% Do what you want
end
카테고리
도움말 센터 및 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!