Change name of a graph inside loop automatically.

Hi,
I have a loop from one to ten. for each loop I got graph. My question is can I change the name of graph automatically?
For example. first graph will have name (Result for experiment number 1)
second graph will have name (Result for experiment number 2),
and so on for all ten graphs
Regards

Antworten (1)

Stalin Samuel
Stalin Samuel am 24 Nov. 2015
for i=1:10
figure(i)
title(sprintf('Result for experiment number %d',i))
end

1 Kommentar

Stephen23
Stephen23 am 24 Nov. 2015
Note that it is recommended to avoid the variable names i and j, as these are both names of the inbuilt imaginary unit.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graph and Network Algorithms finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 24 Nov. 2015

Kommentiert:

am 24 Nov. 2015

Community Treasure Hunt

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

Start Hunting!

Translated by