plotting a figure with a variable as title
显示 更早的评论
Hi, i want to plot a graph and the title of that graph should be equal to the variable mx1. how can i implement that?
采纳的回答
更多回答(1 个)
Star Strider
2014-12-25
Use sprintf:
mx1 = pi;
figure(1)
scatter(rand(10,1), rand(10,1))
grid
ttl = sprintf('Scatterplot For mx_1 = %.5f', mx1)
title(ttl)
类别
在 帮助中心 和 File Exchange 中查找有关 2-D and 3-D Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!