From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2D Array to String Conversion

Hi, I am having some trouble converting my 2D array into string data. I tried casting but 2D arrays seem incompatible with String data.
 
The attached is how I currently do this with 1D arrays and it works well. Any ideas for doing the same with a 2D array would be appreciated. Is there a quick way to do this without having to take a subset of my array?
 


Message Edited by russelldav on 05-12-2008 03:03 PM
0 Kudos
Message 1 of 12
(17,912 Views)
You can reshape a 2D array into a 1D array. Look at the Reshape Array function on the Array palette.

Lynn
Message 2 of 12
(17,906 Views)
Have you tried the following?

Cheers




Message Edited by jmcbee on 05-12-2008 02:08 PM
Message 3 of 12
(17,905 Views)
Thanks guys!
 
I reshaped it and it works perfectly! Thanks so much.
 
 
<sarcasm>
 
P.S Next time can you be a bit quicker with your responses? I almost had to wait a minute before I had the answer I needed Smiley Very Happy 
 
</sarcasm>


Message Edited by russelldav on 05-12-2008 03:20 PM
Message 4 of 12
(17,900 Views)
Hi
I am having a similar problem, i have to read the dat from excel (for ex,it has some 40 rows and 3 coulmns) and need to convert it to string.
 
I tried as in the attached figure, in the dimension size of the reshape array what value i need to enter (either the coulmn or row)
 
Thanks
0 Kudos
Message 5 of 12
(17,785 Views)

Hi Veeru,

you can simply select "string" instead of "double". It is a polymorphic vi. Smiley Wink
And after that you can use the "Concatenate String" function or you read it as a "normal" textfile.

Hope it helps.

Mike



Message Edited by MikeS81 on 06-11-2008 01:02 PM
0 Kudos
Message 6 of 12
(17,778 Views)
Thanks Mike
 
What ihave to do if i need to read only the 2nd column value(40*3 Array)
 
Thanks
0 Kudos
Message 7 of 12
(17,770 Views)
Hi Veeru,
use the "index array" function, use then number to string.
Mike
0 Kudos
Message 8 of 12
(17,766 Views)
Thanks Mike
0 Kudos
Message 9 of 12
(17,764 Views)

this is so bad

0 Kudos
Message 10 of 12
(4,484 Views)