RenameVar(matFName, originalVarName, newVarName)

バージョン 2.0 (1.5 KB) 作成者: Wei-Rong Chen
Rename variable(s) in mat file
ダウンロード: 181
更新 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 Center および MATLAB AnswersWorkspace 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