Create Plot Title of the Plotted Function
2 views (last 30 days)
Show older comments
Forrest Graham
on 8 Apr 2020
Commented: Forrest Graham
on 8 Apr 2020
How can I make the title of a plot the function I am plotting?
Here is the code trying to use:
x = 0:.01:1;
for i= 1:9
subplot(3,3,i)
y = x.^i;
plot(x, y, 'black')
xlabel('x')
ylabel('y')
% title()???
end
0 Comments
Accepted Answer
Bhaskar R
on 8 Apr 2020
x = 0:.01:1;
for i= 1:9
subplot(3,3,i)
y = x.^i;
plot(x, y, 'black')
xlabel('x')
ylabel('y')
title(['Title\_' sprintf('%d', i)])
end
More Answers (0)
See Also
Categories
Find more on Title in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!