How can I get dynamic naming variables? So in a loop i need variables with names A1,A2,A3...... logic?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Respuestas (1)
CS Researcher
el 1 de Mayo de 2016
You can use eval. Try this:
for i = 1:10
eval(['A' num2str(i) ' = i;']);
end
2 comentarios
Ver también
Categorías
Más información sobre Variables en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!