対象となる変数名の命名ルールが「AAA+数字6桁」のように決まっている場合、例えば以下のようにすると個別に保存することができます。
% AAA+数字6桁の変数一覧を作成
varList = who('-regexp','AAA[0-9]{6}');
% (変数名).mat のファイル名で各変数を保存
for kk = 1:numel(varList)
fileName = [varList{kk},'.mat'];
save(fileName,varList{kk});
end
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!