joining a character variable and a numerical variable to call a filename within a loop
Afficher commentaires plus anciens
how do i join the variable n to the variable filename to get the name of a real file that i want to call in a loop?
example
real files called: file 1, file 2 etc..
filename='file';
n=1:5;
for
some action filename + n;
end
many thanks
James
Réponse acceptée
Plus de réponses (2)
Jan
le 24 Fév 2011
2 votes
See also the FAQ:
It is alway a good idea to look for an answer there before asking here.
james
le 24 Fév 2011
0 votes
2 commentaires
Robert Cumming
le 24 Fév 2011
why not? What error are you getting?
Post some code.
james
le 24 Fév 2011
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!