Why fill function doesn't work?
39 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
alexandre xavier
am 11 Dez. 2013
Kommentiert: Alexandre Xavier
am 16 Nov. 2020
Dear folks, I am trying to fill polygons, but the fill function does not working. Does any body know if this function have limitations for the number of points? My code is:
load test
fill(x,y,'r')
Thanks,
Alexandre
0 Kommentare
Akzeptierte Antwort
the cyclist
am 12 Dez. 2013
Because of the NaN at the end of the vector. Try this
load test
x(end) =[];
y(end) =[];
fill(x,y,'r')
3 Kommentare
Doganay Karatas
am 14 Nov. 2020
Error using fill
Not enough input arguments.
Why do i get this error??
HERE IS MY CODE
t=0:pi/50:2*pi;
figure(1)
plot(t,sin(t))
figure (2)
fill (t,sin(t)),('g')
figure (3)
stairs (t,sin(t))
figure (4)
bar (t,sin(t))
end
Alexandre Xavier
am 16 Nov. 2020
This will work
t=0:pi/50:2*pi;
figure(1)
plot(t,sin(t))
figure(2)
fill(t, sin(t), 'r')
figure(3)
stairs(t,sin(t), 'r')
figure(4)
bar(t,sin(t))
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!