Changing the Title of a plot in a nested loop

3 Ansichten (letzte 30 Tage)
Hans123
Hans123 am 5 Feb. 2019
Beantwortet: Jos (10584) am 6 Feb. 2019
I have a Nested Loop that runs multiple iterations, and each iteration is going to spit out a plot.
I want to know whether there is a method to get the iteration number in the title itself, i.e "Plot from Run 1"
something like fprinf with strings, but with the title function

Akzeptierte Antwort

Jos (10584)
Jos (10584) am 6 Feb. 2019
k = 3 ;
str = sprintf('Run %d', k)
title(str)

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by