MATLAB: How to convert to the next integer ? for example if I have x=3.3 , if I used int8(x) result will be 3 but I need it to be 4. I want the result to be always the next integer no matter what the number after “.” is

convertfunctionintegersmathematicsMATLABmatlab functionvariable

Hi How can I convert to the next integer ? for example if I have x=3.3, if I used int8(x) result will be '3' but I need it to be '4'. I want the result to be always the next integer no matter what the number after "." is ?????????

Best Answer

ceil(x)