How do I save a '.txt' file as a '.mat' file, using either MATLAB or Python? I tried using textscan() (in MATLAB), and scipy.io.savemat() (in Python). Both didn't help.
My text file is of the format: value1,value2,value3,valu4 (each row) and has over 1000 rows.
Appreciate any help is appreciated. Thanks in advance.
You can use
textscan
to read the file andsave
to save the variables into a .mat fileThis works because your file seems to have a fixed format. Have a look at this and this