LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rounding Values in an Array

I have an array of 20 values and I want to round off each value to the nearest integer.  What is the best way to do this?  Do I have to send the array through a for-loop and use the round function on each one, or can I just apply the round function to the array.

Thank you,

inlkjlkj
0 Kudos
Message 1 of 3
(3,214 Views)
Just apply the rounding function to the array. No loop needed.
 
Most numeric functions automatically adapt to the input type. Always simply try. If you don't get a broken wire, you're OK. 🙂
Message 2 of 3
(3,202 Views)

Erm, you would have been quicker just going away and trying it Smiley Very Happy

Yes, you can feed the array into the Round to Nearest function then perhaps convert it to integer

cheers

David

Message 3 of 3
(3,199 Views)