保存ファイル名に「実行したmファイル名」を自動で含めることはできますか?
7 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Noriko HOUNOKI
am 26 Nov. 2019
Kommentiert: Noriko HOUNOKI
am 26 Nov. 2019
例えば testfile.mの実行結果を「testfile_out.mat」という名前で保存したいです。
下に直したいコードをつけました。
ここでは手動で 'testfile' と書いてしまっていますが、
自動でこのmファイル名 'testfile' を取得する方法はありますか。
% testfile.m
saveName = ['testfile','_out'];%<-直したいコード
n = rand(3);
save (saveName,'n');
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ワークスペース変数と MAT ファイル finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!