I would like the title of my plot to be user-defined:
So something like: n = input('n: ') title('Plot of ... with n=%5.15f', n)
But this suggested code doesn't work, could someone suggest a command that works? Thank you.

 Akzeptierte Antwort

Walter Roberson
Walter Roberson am 31 Mär. 2012

1 Stimme

title(sprintf('Plot of ... with n=%5.15f', n));

1 Kommentar

Image Analyst
Image Analyst am 31 Mär. 2012
A useful option of title is the ability to set the size of the font:
title(caption, 'FontSize', 30); % or whatever size you want.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by