Combining matrices from workspace or from directory into a single matrix.
Show older comments
Can someone explain how to combine .mat files present in workspace or in directory into one .mat file? The problem is that the files are not properly named and the files have different rows but same number of coloumns.
3 Comments
Arthur Roué
on 17 Jul 2020
I'm not sure about what you want : do you need to merge MAT-File or to concatenate matrix with different size ? What is your original purpose ?
Sachin Patalasingh
on 17 Jul 2020
David Hill
on 17 Jul 2020
If they are in the workspace, then they are already loaded. If they all have the same numbe of columns, then:
newMatrix=[a;b;c;d;e;f;g;h;i];%where a,b,c,d ... are your other maxtrics.
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!