How to assign desired names for created files by Matlab?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
darova
il 28 Apr 2020
Simple example
for i = 1:5
s = sprintf('data%d',i);
A = rand(3);
writematrix(A,s)
end
4 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Environment and Settings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!