Loading waves into a Matrix

 

Hello,

I created a matrix of with the number of rows= N and columns = 7. (root:matrix)

I have 7 different waves (all having length =N) in 7 different folders (root:A140:wave1; root:A141:wave2.... etc). I would like to transfer each of these waves into this Matrix.

Is there some code that exists to do this? For now I am doing this by hand but I need to repeat this exercise several times :-/


Thank you very much

 

First: How much experience do you have with Igor programming? If you are new to this topic, it does never hurt to look into the programming guide: Execute DisplayHelpTopic "Programming Overview"

The problem sounds simple enough to write some lines of code for your specific problem yourself. There are several approaches, for example having a loop to go through you folders and fill the matrix columns with the respective wave data values. Another method could be to use Concatenate which "merges" 1D data into a matrix automatically (Execute DisplayHelpTopic "Concatenate" to display the info about its use). You would only need to think about how to collect the list of waves in your folders.

If you could post a simple experiment file and an explanation what should get done automatically, we could think about the code to achieve that goal.