File name as value of a variable
Afficher commentaires plus anciens
Would you please guide me how to write Excel files whose names are value of a variable, e.g. testdata_i where i is a variable?
This is the code I have that needs some adjustments. Data is a matrix whose values is decided in another loop.
for i = 1:5
filename = sprintf('%s_%d','testdata',i)
writematrix(Data,'filename.xlsx')
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Interactive Control and Callbacks dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!