Showing results for 
Search instead for 
Did you mean: 

Convert 2D string array to 2D number array.

I have the following problem. I need to convert a 2D string array to a 2D number array. My array exists out of 2 columns and x rows. So what I first did was this. Just splitted the array in two parts for each column. At that moment I had two 1D arrays next I converted it with a solution I found here at the forums. It works perfectly only isn't there a way to convert a 2D string array to 2D number array. I myself tried several things but unfortunaly I didn't manage. Anyone can help?
Thanks in regards,
- Wouter
0 Kudos
Message 1 of 11
You don't need aything special, the string/number conversion tools take arrays of any dimension. 🙂

Message Edited by altenbach on 12-13-2007 03:32 PM

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
Message 2 of 11
You should use nested for loops and the Decimal String to in the inner for loop, and use auto indexing coming out of each for loop to rebuild your array.  See the attached vi for an example.  Or use Altenbach's method as I suppose I should have advised you to do as well.


Message Edited by jmcbee on 12-13-2007 04:29 PM
0 Kudos
Message 3 of 11
Oh!!! Thanks man really Smiley Very Happy thank you both. Really thats awesome. I didn't know that was possible.
0 Kudos
Message 4 of 11

the problem i have that i need to send hex string with lingth of 4 as (503D XX54) and the value of XX must change from (0 - FF) by switch array so i made constant strings (503D) and (54), and string (XX) must change by Switch array  then the three strings collected togather but with difreent format  so please if anyone can help me to solve this problem

0 Kudos
Message 5 of 11

Hi soliman,


the problem is you didn't provide any default data in your controls nor did you really describe what you want ("hex string with lingth of 4 as (503D XX54)" - that's a length of 9 chars for me...).

There's a difference between a string in hex display mode or hex numbers or simple strings! But that has been discussed so often in the forum you could easily find threads discussing your question... (Why the hell you're using mathscript to convert a number to a different number?)


In the meantime you may play with that:


Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 6 of 11


hi sir

i realy thank you alot GerdW because your advise helpt me so match in my project

 with all of my respect

and thanks again and again


0 Kudos
Message 7 of 11

Hello, if you are still responding to this thread...I have a question.  How do you extend the significant digits to the number array?  I am trying to retain the forth number down in the attached array of text files: 15.0.txt - including the decimal ".0" after the 15.  The result I get is just ("15").

0 Kudos
Message 8 of 11

I am not sure what you want to achieve here (maybe a VI would help ?) but have you tried to play with the array Display Format ? Right click on it and see what's available 😉

CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 9 of 11

Hi Newton,


what about a better format string when creating those filenames?

Maybe "%.7f" would help!?

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
Message 10 of 11