From: naser on
I want to plot some figure in a "FOR" loop. i use "hold on" to have one figure but i want to have graphs in different colors. please guide me.
From: Dave Robinson on
"naser " <naser.khodabakhshi(a)yahoo.com> wrote in message <hl8vsk$aqr$1(a)fred.mathworks.com>...
> I want to plot some figure in a "FOR" loop. i use "hold on" to have one figure but i want to have graphs in different colors. please guide me.

I think you need to use

"hold all" and this will give you what you what you want.

Regards

Dave Robinson
From: ImageAnalyst on
for k = 1:10
x = rand(1,10);
randomColor = rand(1,3);
plot(x, 'Color', randomColor, 'linewidth', 2);
if k == 1
% Prevent prior plots from getting destroyed.
hold on;
% Maximize figure.
set(gcf, 'Position', get(0,'Screensize'));
end
end
 | 
Pages: 1
Prev: changing select values in a vector
Next: graphs