How do I format this title function?
29 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Kavorka
el 14 de Feb. de 2016
Respondida: Star Strider
el 14 de Feb. de 2016
I'm displaying a figure and I want its title to be a file name as well as a string of text in combination. If the file name was Filename == example.tif and the text was '-ER' I'd want the figure title to be example.tif-ER
Doing this doesn't seem to work:
title(Filename '-ER')
I get an error in return, do I need to put something in between Filename and '-ER' to show I want them one after another as the title?
0 comentarios
Respuesta aceptada
Star Strider
el 14 de Feb. de 2016
Use the sprintf function:
filename = 'example.tif';
plot( ... )
title(sprintf('%s-ER', filename))
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Title 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!