필터 지우기
필터 지우기

How to change the data set name

조회 수: 16 (최근 30일)
Pratik Mitra
Pratik Mitra 2020년 8월 7일
편집: Monisha Nalluru 2020년 8월 10일
I have a data set of 100 in a name of (re180M_119_800,re180M_120,re180M_120_200,re180M_120_400) and want to change in the name of (re180M_100,re180M_101,re180M_102,re180M_103). Kindly guide me or write a code for this. Thanks.

답변 (1개)

Monisha Nalluru
Monisha Nalluru 2020년 8월 10일
편집: Monisha Nalluru 2020년 8월 10일
movefile() is used to move or rename file or folders
you can use something like below
files=dir('re180M_*'); %get files whise name starts with re180M_
for i=1:numel(files)
j=100;
newname=strcat('re180M_',num2str(j)); %assign new name
movefile(files(i).name,newname); %rename the file with new name
j=j+1;
end
Hope this helps!

카테고리

Help CenterFile Exchange에서 Graphics Object Identification에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by