Hey, so i'm working on getting this fill function to work on my Oval, what am i doing wrong.
My function:
function DrawOval(xc,yc,a,b,c)
%Draws and Oval of Major Axis "a" and Minor Axis "b"
%centered at (xc,yc). Returns each x and y value.
for t=0:pi/180:2*pi
X=xc+a*cos(t);
Y=yc+b*sin(t);
plot(X,Y)
end
fill(x,y,c)
My program:
close all
figure
axis equal on
hold on
xc=0;
yc=0;
a=10.9;
b=8.8;
DrawOval(xc,yc,a,b,'b');
thanks a lot
My function:
function DrawOval(xc,yc,a,b,c)
%Draws and Oval of Major Axis "a" and Minor Axis "b"
%centered at (xc,yc). Returns each x and y value.
for t=0:pi/180:2*pi
X=xc+a*cos(t);
Y=yc+b*sin(t);
plot(X,Y)
end
fill(x,y,c)
My program:
close all
figure
axis equal on
hold on
xc=0;
yc=0;
a=10.9;
b=8.8;
DrawOval(xc,yc,a,b,'b');
thanks a lot