Effacer les filtres
Effacer les filtres

Change of saving folder with each iteration

6 vues (au cours des 30 derniers jours)
Jakub
Jakub le 22 Avr 2013
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!!

Réponse acceptée

Walter Roberson
Walter Roberson le 22 Avr 2013
Change the
save(filename,'delta')
to
save(fullfile(filepath, filename), 'delta');

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by