LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

delet tab from 2D array data

I have got 2D array data which I have acquired via GPIB, I need to replace Tab by Space
0 Kudos
Message 1 of 4
(2,707 Views)
You can use two nested For-Next loops to slice your 2D array, in association with a "search and replace string" function. Have a look at the example below. Since I do not use GPIB, I don't know if there are several Tabs in a single string. Therefore, the solution may be even simpler...
Hope this helps !
Chilly Charly    (aka CC)
Message 2 of 4
(2,707 Views)
This can be done using "index array". & LV 7.1
The following implies that you know the dimension of your 2D array , then
put one "for loop" inside another "for loop" thus to be able to have with
the "index array.vi" the scalar value of your 2D array.
Connect the right iteration loop the index Row and Column of the "index
array". Normaly the inside "for loop" has the index(col) connect to it and
the outside "for loop" the index(row).
As you can now sample each output value of your 2D array, test it and
replace Tab value by space one.
Connect another 2D array at the output of the seconde "for loop" to rebuilt
your 2D array with the new values.
Namely you go the other way round, that is from scalar to 2D array.
Make sure that the two output "loop tunnel" are "enable
indexing".

I hope you understand all this

Regards

Gérard



--
Gérard Férini
Switzerland
http://home.tiscalinet.ch/gferini/Main_Photos.html

remove -move to reply personally
"mans" wrote in message
news:50650000000800000010F90000-1079395200000@exchange.ni.com...
I have got 2D array data which I have acquired via GPIB, I need to
replace Tab by Space
0 Kudos
Message 3 of 4
(2,707 Views)
I realize that I probably misinterpreted your problem. I supposed that your 2D array was a 2D string array, and gave a straighforward solution.
Could you just precise what kind of data you have in your array (1D array of alphanumerical data separated by tabs ?) (you could post an example) and also what is the purpose of replacing Tab by Space (display, file saving, something else ...)?
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 4
(2,707 Views)