02-15-2012 05:31 PM
Hello
I have a text string which contains measurement frames.
I want to place each frame in an initially 0, 11x11 array (with the same order in the text file).
In figure below, I tried convert to an array, but the array contains only the first "column" in the text file.
Any suggestions?
Solved! Go to Solution.
02-15-2012 06:25 PM
02-15-2012 06:30 PM
Please attach your code and a typical sample file.
02-15-2012 06:39 PM
Hi
Yes, the order is the same as shown in text string.
This daya is generated by a tomographic measurement device and I want to use it in LabVIEW.
The .vi file and data file is attached.
Thanks
02-15-2012 09:09 PM
Your data is separated by spaces, or multiple spaces, not tabs.
So using spreadsheet string to array is not going to work with the default delimiter of tab.
02-16-2012 01:31 AM - edited 02-16-2012 01:33 AM
Ravens is right, your string is quite dirty with variable numbers of spaces, lines beginning with spaces, and space+newline delimiters.
In cases like this, I like "scan strings for tokens", because it can automatically contract consecutive delimiters into one. Here's a quick example.
Since your rows are variable lenght, a 2D array seems unsuitable, because all rows will have the same number of elements. Consider a 1D array of clusters containg 1D arrays, for example.
(Of course it would be cool of "spreadsheet string to array" could directly deal with consecutive delimiters as found here, so please support my idea. It certainly deserves more than 24 votes :D)
02-16-2012 04:37 AM
Thank you so much Altenbach.
My problem is solved:)