creating separately named .mat files and combining

I have code that I have to run 10 times manually. each time, i want it to record certain data in a .mat file, take those ten separate files, combine and sort so I can use for analysis. Can someone help? The data is just two columns of data.

Answers (1)

See the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F You can use the sample code in there to both create filenames for outputting your .mat files, and for getting mat filenames to read back in. Then use load() and sort() to do whatever you want to do with them.

Tags

Asked:

on 21 Apr 2015

Answered:

on 21 Apr 2015

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!