The ceil() function in MATLAB can be used to round up a number to the nearest integer or to a certain number of decimal points. Here's an example:
main.m106 chars4 lines
The variable y will be equal to 7, while z will be equal to 6.8. The ceil() function can be used on both positive and negative numbers.
gistlibby LogSnag