Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

Colorful circles generation on black background in MATLAB

MATLAB Programs:

%Code:

axis([-10 10 -10 10]);
fill([-10 -10 10 10],[-10 10 10 -10],'k');
pause(2);
hold on;
pause(0.1);
t=0:0.1:3*pi;
e=10*rand(1,length(t)).*cos(t);
f=10*rand(1,length(t)).*sin(t);
for i=1:length(e)
    x=e(i)+cos(t);
    y=f(i)+sin(t);
    plot(x,y,'linewidth',5);
    axis([-10 10 -10 10]);
    axis square;
    pause(0.1);
end


No comments

Popular Posts

Followers