How do I combine multiple MATLAB files into a single file?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 16 Jan 2010
Commented: guygyuggfff
on 17 Jun 2021
I would like to combine multiple MATLAB files into a single file.
Accepted Answer
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.
0 Comments
More Answers (0)
See Also
See Also
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!