MATLAB赢得';t打开由Octave创建的文件

MATLAB赢得';t打开由Octave创建的文件,matlab,octave,compatibility,Matlab,Octave,Compatibility,我使用Octave生成并保存了大量数据文件,现在我需要在MATLAB中打开它们,作为分析它们的一部分。MATLAB指出了这个错误 Error using load Unable to read MAT-file [file path]/PhPar_40.mat: not a binary MAT-file. Try LOAD -ASCII to read as text. Error using load Number of columns on line 2 of ASCII file [f

我使用Octave生成并保存了大量数据文件,现在我需要在MATLAB中打开它们,作为分析它们的一部分。MATLAB指出了这个错误

Error using load
Unable to read MAT-file
[file path]/PhPar_40.mat: not a binary MAT-file.
Try LOAD -ASCII to read as text.
Error using load
Number of columns on line 2 of ASCII file
[filepath]/PhPar_40.mat must be the same as previous lines.
尝试其load-ASCII的建议,然后会出现此错误

Error using load
Unable to read MAT-file
[file path]/PhPar_40.mat: not a binary MAT-file.
Try LOAD -ASCII to read as text.
Error using load
Number of columns on line 2 of ASCII file
[filepath]/PhPar_40.mat must be the same as previous lines.

我(现在)知道Octave能够以MATLAB可读的格式保存,但是重新创建这些数据文件会花费大量的时间,而且确实不是一个选项。有没有办法让MATLAB读取这些文件?

MATLAB无法打开这些文件,因为这些文件没有按八度正确保存。尝试通过以下命令将其保存为八度:

save -mat7-binary '[filepath]/PhPar_40.mat' 'm'
若你们有大量的文件,你们可以把所有的文件放在文件夹中,然后运行一个迭代器来读取所有文件,并自动以正确的格式加载和保存。此迭代器将类似于:

file = dir('[filepath_read]/*.mat'); 
index = 1;   
while (index==length(file)+1)
   m = load('file(index).name')
   save -mat7-binary strcat("[filepath_write]/", file(index).name, ".mat") 'm';
   index = index+1;
   pause(1);
endwhile

将所有文件转换为正确格式后,在MATLAB中加载它们。我希望它能解决你的问题

为什么你认为“这些音阶不能正确地保存在八度音阶上?”?你知道eyeballfrog用来保存文件的参数吗?请分享你用来保存文件的八度命令。