Code covered by the BSD License  

Highlights from
Round Toward Vector of Values

5.0

5.0 | 1 rating Rate this file 24 Downloads (last 30 days) File Size: 2.16 KB File ID: #37674

Round Toward Vector of Values

by

 

31 Jul 2012 (Updated )

Round values towards a given vector of choices.

| Watch this File

File Information
Description

This function will round an inputed matrix, of any size, and round each value towards the vector of choices given. It can also be given a type of round ('floor','fix','ceil','round','away'), and will round toward -inf,0,inf,closes value respectively, or away from 0 respectively.

Acknowledgements

This file inspired Round To Vector.

MATLAB release MATLAB 7.13 (R2011b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
14 Jan 2013 Joey

This is excellent

Updates
02 Aug 2012

Fixed problem with round when the number is in between two integers.

03 Aug 2012

The function can now round away from 0 (the opposite of floor).

09 Aug 2012

Little tweaks for speed

Contact us