convert mat files (struct) to ascii text files / save data as ascii text

convert mat files (struct) to ascii text files / save data as ascii text

Post by Stijn Oon » Fri, 25 Dec 2009 03:43:06


I'm using a script that saves data (x,y) as .mat files in struct format. However I need it to save the data as ascii text files. How can this be done? I've tried save -ascii etc etc but matlab returns that the data format is not suitable to save as ascii.

So is there a (simple) way to either save my data as ascii text or convert a generated .mat file to ascii text file (CSV or else)?

Thanks!
 
 
 

convert mat files (struct) to ascii text files / save data as ascii text

Post by Natha » Fri, 25 Dec 2009 03:49:07


You could always try writing the data using other functions

See: dlmwrite, csvwrite, xlswrite...

Here are the built in ways to load/save data in matlab:
http://www.yqcomputer.com/

-Nathan