How do I combine multiple MATLAB files into a single file?

10 views (last 30 days)

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Jan 2010
While there is no MATLAB function that performs this, this objective can be accomplished by entering the following DOS command at the MATLAB command prompt:
!copy *.m combined.m
Alternatively you can use the file operation commands to read the files and write them out into a single file.

More Answers (0)

Categories

Find more on File Operations in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!