필터 지우기
필터 지우기

How to copy file with index start from 079

조회 수: 1 (최근 30일)
Med Future
Med Future 2022년 2월 3일
답변: KSSV 2022년 2월 3일
Hi i have the file name frameTest078.mat i want to make 10 copies of this file name as starting from frameTest079, frameTest080. I have used the following code but it does not same in frameTest079.mat . I have attached the file
for k=1:10 file=sprintf('frameTest%03d.mat',k) copyfile('frameTest078.mat',file); end

답변 (1개)

KSSV
KSSV 2022년 2월 3일
MAy be you are looking for:
for k=79:89
file=sprintf('frameTest%03d.mat',k) ;
copyfile('frameTest078.mat',file);
end

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by