MATLAB: What is the role of CEIL

ceil

CENTS = F( ceil(rand(K,1)*size(F,1)) ,:);

Best Answer

The ceil (link) function rounds toward +Inf. In the assignment you posted, its function appears to be to avoid a zero index, since MATLAB indices must be integers greater than zero.
Related Question