MATLAB: Try to use the cells saved in another m file

cell variablessave and load

Hi guys, I'm trying to use save to save some of my cell variables and expecting to use them in another m file by using load. Before I used save, the .m file with those cell variables can be run perfectly. However, after I put the save('.m','variable1'…) in, and run the file again, it can be run for one time, but then after like around 10 seconds, all the codes became garbled characters and there is no way to go back (I have to rewrite everything). Can anyone help me are there any ways that we can solve this problem, or is there any other ways we can call those cell variables from another .m file please? Thank you in advance.
P.S. I have also tried to just save one of the required cell (it has 788 rows and 8 columns and there are doulbes and strings are included within the cell). But the same problem occurred again.

Best Answer

If you use save() and name a .m file, then you should give the -ascii flag to force the data to be saved as text.
I would suggest, though, saving to a .mat file without the -ascii flag.
Related Question