r/matlab•
WeAreNakama

How to fill an empty matrix with data sets vertically instead of horizontally?

HomeworkQuestion

Hi, I just can't seem to figure this out, so help is much appreciated.

Here's my code for importing data and filling the empty matrix: https://pastebin.com/1CS2VWfc

The files are named 'Measurement00001_Run00xx_Spot0000x_FC_CHx.csv' and I need to import only those files where the "CH" is 1 and 2, where the "Spot" is 1 to 5 and where the "Run" is 6 to 16. This results in 2x5x11 = 110 data sets that are 4065 x 30 each. I start with an empty matrix called 'files' and fill that up with each data set, resulting in a final matrix that is 4065 x 3300.

So this empty matrix fills up horizontally with my loop. How can I get it to fill vertically instead? I've googled and googled but just can't seem to find the right answer and I have no idea where to start. I need to end up with a 447150x30 matrix.

Hope to find some answers here! Thanks

Posted Jun 3, 2017, 5:25 PM UTC

44
Loading comments…