How can a put a variable into a text string
显示 更早的评论
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 个评论
Antonia Ciocoiu
2018-7-6
编辑:Antonia Ciocoiu
2018-7-6
a=(['Testing',num2str(2)]);
plot(x,y) %% plot your variables
xlabel(a)
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
