LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

a question about array of strings (1d->2d)

I have a 1d array of strings. It is obtained by Folder list, so it's a list of filenames. I have to group the files into subsets, analyse each subset and only at the end, put the results together.
The information on how to group the files is contained in the filenames.
For example each file going to the group n.5 contains the number 5 in its filename.
The groups have not the same number of files.
Here is my idea. I think to convert the 1d array into a 2d array of strings using 2 nested while loops using matching strings functions and enabling indexing in the while loops. In this way I could  subdivide the 1d array into several 1d arrays. (I have not tried yet, and I don't exactly know if doing so all the output 1d arrays will have the same number of elements or not).
After that when I will have the filenames subdivided into subsets I will use a for loop for the analysis of each subset.
I would like to know if I am going in the right direction or you could suggest to me an easier implementation.

0 Kudos
Message 1 of 2
(2,263 Views)

Hello,

 

It is not entirely clear what you are trying to do here. Do you have a standardized format for all of these filenames? If so, simply auto-indexing through the 1D array and using the appropriate string functions should allow you to accomplish your goal. Also, what about your output? All in all, your desired input and output is going to dictate how you go about this. Perhaps you could detail an example of sample inputs and the desired output.

 

-Zach

0 Kudos
Message 2 of 2
(2,243 Views)