0

I have a really dummy question about MATLAB coding, how can I combine multiple .mat file in un a single matrix to make then stat analysis on?

I know how to load them using for-loop, but I can't "concatenate" them in a single matrix.

ay help will be super appreciated!

  • 1
    It's because you can't concatenate them in a matrix. You need a 3-dimensional array, i.e. a tensor. You can also use cells. – stressed out Jan 30 '19 at 15:24
  • humm, I see. I'm struggling to combine them in an appropriate form to make analysis on, then. With the cell array can I then "select" an array cell and then go through it with analysys? thanks x – Stephano Jan 30 '19 at 15:28
  • 1
    Yes, you can select an element of a cell like A{1} just like an array, but with curly brackets. You can have a cell that consists of many entries but each entry itself is a matrix with double entries, for example. If being optimized in terms of execution speed is important for you, you may want to ask your question on stackoverflow or codereview instead of the math subdomain of stackexchange. – stressed out Jan 30 '19 at 15:31
  • 1
    your comment it's been so precious. thank you x – Stephano Jan 30 '19 at 15:38
  • 1
    Glad that it helped. You're welcome. – stressed out Jan 30 '19 at 15:40

0 Answers0