plotting a figure with a variable as title
Show older comments
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?
Accepted Answer
More Answers (1)
Star Strider
on 25 Dec 2014
Use sprintf:
mx1 = pi;
figure(1)
scatter(rand(10,1), rand(10,1))
grid
ttl = sprintf('Scatterplot For mx_1 = %.5f', mx1)
title(ttl)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!