here it is,
code of a circle then by changing the z as the circle height and changing the r as its radius i can create a cone( at least something like it ).
r=1
teta=-pi:0.01:pi
x=r*cos(teta);
y=r*sin(teta);
z=zeros(1,numel(x));
plot3(x,y,z);
hold on
% ----------------------------------- %
for i = 1 : 20
z=z+0.05;
r=r-0.05;
x=r*cos(teta);
y=r*sin(teta);
plot3(x,y,z);
hold on
end
hold off