1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
| coul = get(handles.couleur, 'Value');
tail = get(handles.taille, 'Value');
nbp=get(handles.nombre,'Value');
switch coul
case 1
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'b.');
set(p,'MarkerSize',tail);
bleu;
axis([0 1 0 1]);
case 2
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p = plot(x,y,'c.');
set(p,'MarkerSize',tail);
cyan;
axis([0 1 0 1]);
case 3
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'y.');
set(p,'MarkerSize',tail);
jaune;
axis([0 1 0 1]);
case 4
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'m.');
set(p,'MarkerSize',tail);
mangenta;
axis([0 1 0 1]);
case 5
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'k.');
set(p,'MarkerSize',tail);
noir;
axis([0 1 0 1]);
case 6
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'r.');
set(p,'MarkerSize',tail);
rouge;
axis([0 1 0 1]);
case 7
for i=1:nbp
for j=1:nbp
x(i)=rand(1,1);
y(j)=rand(1,1);
end
end
p=plot(x,y,'g.');
set(p,'MarkerSize',tail);
vert;
axis([0 1 0 1]);
otherwise
end |
Partager