Use the index in a FOR loop for a string
Mostrar comentarios más antiguos
How do I make 50 plots (in separate figures) using the following format:
for i = 1:50
figure('name','Hurricane "i"')
scatter(x,y,10,z"i");
title('Hurricane "i"');
end
e.g. I want graphs like scatter(x,y,10,z36) with the title of "Hurricane 36". Thanks for your help in advance.
Respuesta aceptada
Más respuestas (1)
John Osborne
el 10 de Abr. de 2017
Editada: John Osborne
el 10 de Abr. de 2017
Try
figure(i)
%plotting commands
title(['Hurricane ' num2str(i)])
Categorías
Más información sobre Creating and Concatenating Matrices en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!