Moving arrow -Translation of figure in MATLAB
Code:
figure;
hold
on;
axis([-2
52 -2 2]);
axis
equal;
pause(10);
for i=0:2:50
t=0:2*pi/3:2*pi;
x=cos(t);
y=sin(t);
x1=[x(1)
x(2) -1 0.2 -1 x(3) x(1)]+i;
y1=[y(1)
y(2) y(2) 0 -y(2) y(3) y(1)];
fill(x1,y1,'k');
hold
on;
pause(1);
axis
equal;
end
Join us on Telegram : https://t.me/matlabirawen
No comments