How can a put a variable into a text string
Mostrar comentarios más antiguos
I want to put a variable onto a graph.
I have tried text(x,y,'Text ' num2str(variable) ' moretext') with no luck.
The only information I can find is how to put a variable in the title of a graph. I simply want it to be displayed at a location of my choosing on the graph.
1 comentario
Antonia Ciocoiu
el 6 de Jul. de 2018
Editada: Antonia Ciocoiu
el 6 de Jul. de 2018
a=(['Testing',num2str(2)]);
plot(x,y) %% plot your variables
xlabel(a)
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Characters and Strings en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
