如何使用matlabprefs.mat解决此错误

时间:2015-08-10 18:37:49

标签: matlab

执行一小段代码(MWE不相关),我收到以下错误消息:

Error using load
Unable to read MAT-file /Users/.../.matlab/R2012b/matlabprefs.mat: not a
binary MAT-file.
Try LOAD -ASCII to read as text.
Error in prefutils>loadPrefs (line 43)
fileContents = load(prefFile);

Error in prefutils (line 11)
[varargout{1:nargout}] = feval(varargin{:});

Error in ispref (line 32)
Preferences = prefutils('loadPrefs');

Error in mpt_subSolvers (line 11)
if ispref('MPT','MPTOPTIONS')

Error in mptopt (line 156)
    function options = mptopt(varargin)

Error in Polyhedron (line 422)
            MPTOPTIONS = mptopt;

有人建议删除文件matlabprefs.matLink)但我找不到此文件。有没有关于如何解决这个问题的提示?

1 个答案:

答案 0 :(得分:2)

解决方案确实是要删除文件matlabprefs.mat(它是空的)。为了做到这一点,我必须使隐藏文件可见。有关在Mac上执行此操作的详细信息,请参见here