Change of saving folder with each iteration
2 次查看(过去 30 天)
显示 更早的评论
I want to set path where to save a file. But this saving function is in loop and name of saving variable is changing every iteration.
for k....
for l......
filename = [ 'delta',num2str(l) ,num2str(k), '.mat'];
save(filename,'delta')
end
end
and i want to change name of folder where to save also with every iteration.
filepath=['c:\....\' int2str(l) '\'];
Thanks for help!!
0 个评论
采纳的回答
Walter Roberson
2013-4-22
Change the
save(filename,'delta')
to
save(fullfile(filepath, filename), 'delta');
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!