RenameVar(matFName, originalVarName, newVarName)

버전 2.0 (1.5 KB) 작성자: Wei-Rong Chen
Rename variable(s) in mat file
다운로드 수: 180
업데이트 날짜: 2021/3/16

라이선스 보기

This function replaces the name of a variable ('originalVarName') in a mat file ('matFName') with a new variable name ('newVarName').
Usage: RenameVar(matFName, originalVarName, newVarName)

Example:
a=1; b=2; c=3; save('A','a','b','c');
whos('-file','A')
------------------------------------------
Name Size Bytes Class Attributes
a 1x1 8 double
b 1x1 8 double
c 1x1 8 double
------------------------------------------
RenameVar('A','a','a1');
whos('-file','A')
----------------------------------------------
Name Size Bytes Class Attributes
a1 1x1 8 double
b 1x1 8 double
c 1x1 8 double
----------------------------------------------

인용 양식

Wei-Rong Chen (2024). RenameVar(matFName, originalVarName, newVarName) (https://www.mathworks.com/matlabcentral/fileexchange/48530-renamevar-matfname-originalvarname-newvarname), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2011a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Workspace Variables and MAT-Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
2.0

Support multiple changes

1.1.0.0

.

1.0.0.0