How to assign desired names for created files by Matlab?
1 次查看(过去 30 天)
显示 更早的评论
Hello
my Matlab code saves each matrix as a csv file at the end. The problem is the file names. I want names to be taken from a calumn of names such as [b12;b20;b75;b151], one after each other. How should I assign each element of this vector as a file name? I appreciate if someone can help in this.
0 个评论
采纳的回答
darova
2020-4-28
Simple example
for i = 1:5
s = sprintf('data%d',i);
A = rand(3);
writematrix(A,s)
end
更多回答(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!