Round off to nearest 5 instead of 10. Here s your step by step action plan to automate your work with matlab. B floor a rounds the elements of a to the nearest integers less than or equal to a for complex a the imaginary and real parts are rounded independently.