To round a number to the nearest lower integer, you can use the floor function in Matlab. Here's an example:
main.m58 chars4 lines
The floor()
function always returns the nearest integer that is less than or equal to the input number. So in this example, it returns 3 which is the next lower integer to 3.8.
gistlibby LogSnag