LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average data from 50 text files

I tried the suggestion given and somehow i can not get it done. I have decided to try a different question. I have several 2D data files, such as ttest_001 as attached here. I want to feed their contents into 2 matrices, one matrix for each column of the input files, such that with each file I add, the data is appended to each matrix column-wise. The goal is to end up with matrix 1 that filled with data from column one of the individual files and matrix 2 with data from column 2. I have a simple vi attached, but this vi is not giving appended matrices, but is just replacing the contents. I desperately need help with for-loops to achieve this.

 

 

For the attached 2 files matrix 1 would be:

1   4
1   4
1   4
1   4
1   4

 

and matrix 2 would be:

 

2   5
2   5
2   5
2   5
2   5

 

Thanks,

 

Chando

Download All
0 Kudos
Message 11 of 12
(314 Views)

Chando,

 

Try doing it without for loops.

 

I did not have the test files in a folder of their own so I just read each file separately.  That has no effect on the data manipulation process.

 

Index the appropriate columns and use Build Array to get the 2D arrays.  If needed, convert to matrix form.

 

Lynn

 

Array manipulation.png

0 Kudos
Message 12 of 12
(306 Views)