ceil function is wrong..??
x=-5:0.1:5;
y=ceil(x);
plot(x,y);
axis([-5 5 -5 5]);
title('y=ceil(x)');
1
vote
seongha hwang
shared this idea
The ceil function is working properly. You may be experiencing an issue involving floating-pooint arithmetic.