LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to converse the 1-v string array to 1-v number array?

here is a 1-v string array !I want to converse the 1-v string array to 1-v number array/.how can i do it?
thanks a lot!
0 Kudos
Message 1 of 5
(2,904 Views)
Try one of the convert functions from the "String/Number conversion" section of the "String" menu, e.g. "Decimal String to Number" which is placed in a loop.

Stephan
0 Kudos
Message 2 of 5
(2,904 Views)
The easiest way to convert a string array to a numeric array is to use a For Loop auto-indexed on the string array. Inside the loop use Fract/Exp String to Number (or one of the other conversion functions from the String >> String/Number Conversion function palette that match your expected number type). Add a numeric indicator array outside of the For Loop and let the loop create it by auto-indexing.
See the attached LabView 6.1 example.
0 Kudos
Message 3 of 5
(2,904 Views)
No for loop is necessary. The function is polymorphic so you can wire the array directly to it.
0 Kudos
Message 4 of 5
(2,904 Views)
Thanks Dennis! That's a neat trick. I've been using LabView for almost 10 years and I'm still learning.
0 Kudos
Message 5 of 5
(2,904 Views)