我在使用csvread函数时,想通过循环的方式来读取多个文件,其中我的多个文件都采用类似以下的命名方式:11ABC,12ABC,13ABC...目前我只能一个一个读取如:csvread("11ABC"),可以通过循环的方式一次读取多个吗?

댓글 수: 1

fa wu
fa wu 2023년 7월 21일
편집: fa wu 2023년 7월 21일
用readall+datastore来实现读入多个文件不是更加方便么?

댓글을 달려면 로그인하십시오.

 채택된 답변

1 개 추천

eval( [ 'z',num2str(i), '=csvread(','''',num2str(i),'ABC','''',')' ] )

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 循环及条件语句에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!