Effacer les filtres
Effacer les filtres

change output filename in a loop

3 vues (au cours des 30 derniers jours)
Mohammad
Mohammad le 15 Nov 2012
Hello. I have a series of variable like g_1,g_2.....g_n that produced in a for loop I want to save each of them in a individual text file like g_1.txt,g_2.txt ,... how can i do that?. could you please help me?. for example: for i=1:10 g_i=i; save g_i.txt g_i -ascii end I don't know how change the g_i.txt in a loop thank you.

Réponses (1)

Matt Fig
Matt Fig le 15 Nov 2012

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by