Member of the basic class.
c = round(a)
Rounds input elements to the nearest integer value.
| Name | Description |
| a | Specifies a scalar, vector, or matrix. |
| Name | Description |
| c | Returns the elements of a rounded to the nearest integer value. If the fractional component of an element in a is 0.5, LabVIEW rounds away from zero. If a is complex, LabVIEW computes the nearest integer values using the following equation: c = round(real(a))+round(imag(a))*i. c is a matrix of the same size as a. |
% The expected result is:
% [-4, -3, -2, -1, 1, 3, 4]
A = [-3.7, -2.5, -1.5, -1.2, 1.3, 2.5, 3.7]
C = round(A)