function asteroida(R)

%asteroida kresli asteoidu pomoci szmbolickeho toolboxu
%volani> asteroida(R)
%R...polomer pevne kruznice (pohybliva ma polmer R/4)


if R<0
    error ('Polomer musi byt kladne cislo!')
end
syms t

x=1/4*R*(3*cos(t)+cos(3*t));
y=1/4*R*(3*sin(t)+sin(3*t));

ezplot(x,y,[0,2*pi])

%pridani kruznice
x2=R*cos(t);
y2=R*sin(t);
hold on
h=ezplot(x2,y2,[0,2*pi]);
set(h,'color',[0 0 0])%cerna barva
title('aasteroida')
hold off