From: th on
Hallo there.

I have a ''for loop'' with age=5:5:80 being the variable.I want to plot a function(is in the for loop) but I want for every age to have a different colour in the plot line.Does enayone know how to do that??

thanks in advance!


for age=5:5:80;
scatterfun=(10./((angle+minangle).^(st*3))) + ((1+age/70)^4)./((angle+minangle).^(st*2));



figure(1);
hold on;

plot(yc, (max(scatterfun)), 'r');
end
From: Petros Mpogiatzis on
"th " <THOMITSU(a)YAHOO.COM> wrote in message <i1n61u$m07$1(a)fred.mathworks.com>...
> Hallo there.
>
> I have a ''for loop'' with age=5:5:80 being the variable.I want to plot a function(is in the for loop) but I want for every age to have a different colour in the plot line.Does enayone know how to do that??
>
> thanks in advance!
>
>
> for age=5:5:80;
> scatterfun=(10./((angle+minangle).^(st*3))) + ((1+age/70)^4)./((angle+minangle).^(st*2));
>
>
>
> figure(1);
> hold on;
>
> plot(yc, (max(scatterfun)), 'r');
> end

try
instead of
plot(yc, (max(scatterfun)), 'r');

the following:

plot(yc, (max(scatterfun)),'Color',rand(1,3));
From: th on
"th " <THOMITSU(a)YAHOO.COM> wrote in message <i1n61u$m07$1(a)fred.mathworks.com>...
> Hallo there.
>
> I have a ''for loop'' with age=5:5:80 being the variable.I want to plot a function(is in the for loop) but I want for every age to have a different colour in the plot line.Does enayone know how to do that??
>
> thanks in advance!
>
>
> for age=5:5:80;
> scatterfun=(10./((angle+minangle).^(st*3))) + ((1+age/70)^4)./((angle+minangle).^(st*2));
>
>
>
> figure(1);
> hold on;
>
> plot(yc, (max(scatterfun)), 'r');
> end




se efxaristw para poli!!!!!!na sai kala!