特定のフォルダへmatファイルを保存する方法
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
以下のようなループ処理の中で繰り返し番号付きのmatファイルを作ったのですがこのmatファイル群を特定のフォルダに入れるにはどうすればいいでしょうか。
フォルダはすでに作ってあり、フォルダ名は「C」とします。
rootname = 'A_';
extension = '.mat';
for k=1:5
B(:,1) = 1+k;
B(:,2) = k-1;
data=B;
filename = [rootname, num2str(k), extension]; % ファイル名の作成
save(filename,'data',) % ファイルへの保存
end
0 commentaires
Réponses (1)
Voir également
Catégories
En savoir plus sur ファイルの操作 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!