LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting array numeric precision?

What's the easiest LabView method to convert the precision of the numbers within and array? I have an array of approx 4000 numbers with 4 decimal place precision and would like to convert all numbers within the array to 1 decimal place precision.
Any help greatly appreciated.
0 Kudos
Message 1 of 2
(2,926 Views)
(The number of decimal points is usually a MMI thing. Change it in the MMI,
by right clicking and press Format & Precision. There is no need to change
the actual /data/ within the array.)

If you do need it, multiply the array by 10, round to nearest, and devide by
ten.

Or use the Quotient & Remainder, use 0.1 for y, and multiply floor by 0.1.

Or use the Quotient & Remainder, use 0.1 for y, and subtract the remainder
from the original.

All functions are polymorphic, meaning the array can be one input, and the
0.1 another. No need to use for loops.

Regards,

Wiebe.

"Alan_Backstrom" wrote in message
news:5065000000080000002D570000-1027480788000@exchange.ni.com...
> What's the easiest LabView method to convert the precision of the
> numb
ers within and array? I have an array of approx 4000 numbers with
> 4 decimal place precision and would like to convert all numbers within
> the array to 1 decimal place precision.
> Any help greatly appreciated.
0 Kudos
Message 2 of 2
(2,926 Views)