Writing a cell array to a .m file

3 views (last 30 days)
Michael
Michael on 18 Jun 2014
Answered: Star Strider on 18 Jun 2014
I have a 1x5 cell array "D" that I want to write to a new .m file.
the cell array is made up of strings, and I cannot get fprintf to work with a cell array input. Is there another way I can write this to a file?

Answers (1)

Star Strider
Star Strider on 18 Jun 2014
Yes.
Use a ‘.mat’ file. See the Examples section in the save documentation (and its friends, whose documentation are at the end of the save page) for details.

Community Treasure Hunt

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

Start Hunting!