LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Storing multiple waveforms in a single matrix

I collect (say) 10000 points of a waveform and then repeat the proceedure 10 times (for loop). How can I store each waveform as a row or column of a matrix for post processing in Matlab? Using LabView 8.0.
Cheers.
0 Kudos
Message 1 of 3
(2,586 Views)
feijoa,

I am not too familiar with how you can use the matrix data in Matlab, but I can show you how to organize the data points into a matrix in LabVIEW. I can also show you how to store this data to a file if that is what you really want to do. We can start with the matrix and go from there.

To use the matrix, you can wire a 2D array of numerics to the matrix indicator. Depending on how you acquire your data points, this will most likely require 2 loops. In the inner loop, you can build a 1D array that corresponds to the first waveform. When this loop completes writing the 10,000 points to an array, you can then wire the output to the wall of the outer for loop and enable indexing. Thus when the outer loop executes 10 times, the output from the indexed terminal will be a 2D array with each column representing data points for one waveform. I have attached a small example that should demonstrate this concept. I hope this helps! Please let me know if I can help further. Thanks,

Mike
National Instruments
Applications Engineer


0 Kudos
Message 2 of 3
(2,576 Views)
Duffman (Mike),
thanks for the quick response. That is pretty much what I wanted. I am now able to gather a bunch of waveforms, process them in Matlab, and then save the result. Fantastic.
Much appreciated.
0 Kudos
Message 3 of 3
(2,561 Views)