Round to X
Rounds the supplied N-D matrix to the values in a supplied array.
You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Cite As
W. Owen Brimijoin (2026). Round to X (https://in.mathworks.com/matlabcentral/fileexchange/47178-round-to-x), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: roundtowardvec
General Information
- Version 1.4.0 (2.23 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
| Version | Published | Release Notes | Action |
|---|---|---|---|
| 1.4.0 | Fixed 0.5 error, improved inputs and input checking (including error for complex values), and added a 'See Also' line. Function was also changed in name from round2vec to round2x, to reflect the fact that the round values could ND. |
||
| 1.3.0 | In fixing a NaN problem, an Inf problem was introduced. This has been corrected! |
||
| 1.2.0 | Changed page name |
||
| 1.1.0 | Fixed a ceiling/floor bug that occurred when all values in supplied data were outside the range of the rounding vector. Also added an error check relating to rounding vectors there were either empty or contained NaNs. |
||
| 1.0.0 |