2016-11-15 98 views
0

启动Matlab时,我得到巨大的错误。它说它无法加载pathdef.m 当我使用Windows资源管理器时,我无法打开该文件。Matlab无法加载pathdef.m

我正在远程使用学校计算机,这不受IT部门的支持。我的教练让我使用这台“超级计算机”进行大量计算,并且他不想做任何更改,因为有其他用户同时使用它。

我已经能够只写:“restoredefaultpath; matlabrc”,我可以再次使用Matlab ...但没有工具箱,我认为...我相信我现在需要它,因为我是无法使用。

h = figure(1); 
hold on 
[AX,H1,H2]= plotyy(x1,y1,x2,y2); 
set(AX,{'XScale'},{'log';'log'}) 
set(AX,{'ycolor'},{'b';'r'}) 
legend('Data 1','Data 1') 
xlabel('X AXIS') 
ylabel(AX(1),'Y1 Axis') 
ylabel(AX(2),'Y2 Axis') 
grid on 

变量AX被定义为一个数字而不是一个轴手柄。有没有办法通过这个?

以下是完整的错误:

C:\Program Files\MATLAB\R2013a\toolbox\local\pathdef.m: Cannot open file: permission denied. 
Warning: MATLAB did not appear to successfully set the search path. To recover for this session of MATLAB, type "restoredefaultpath;matlabrc". To find out how to avoid this warning the next time you start MATLAB, type "docsearch problem path" after recovering for this session. 
Warning: Duplicate directory name: C:\Program Files\MATLAB\R2013a\toolbox\local 
Warning: Initializing Handle Graphics failed in matlabrc. 
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: 
MATLAB:undefinedVarOrClass 
Undefined variable "graphics" or class "graphics.internal.initializeMATLABRoot". 
Warning: Initializing Java preferences failed in matlabrc. 
This indicates a potentially serious problem in your MATLAB setup, which should be resolved as soon as possible. Error detected was: 
MATLAB:UndefinedFunction 
Undefined function 'usejava' for input arguments of type 'char'. 
> In matlabrc at 110 
Warning: Failed to add default profiler filters. 
> In matlabrc at 149 
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException 
    at com.mathworks.mlwidgets.graphics.ModelStateFactory.createNoSelectionModelState(ModelStateFactory.java:242) 
    at com.mathworks.mlwidgets.graphics.PlotToolSetFactory$3.parseComplete(PlotToolSetFactory.java:127) 
    at com.mathworks.mlwidgets.graphics.ModelStateFactory$ProductInfoListener$1$1.run(ModelStateFactory.java:1023) 
    at java.awt.event.InvocationEvent.dispatch(Unknown Source) 
    at java.awt.EventQueue.dispatchEvent(Unknown Source) 
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
    at java.awt.EventDispatchThread.run(Unknown Source) 
+0

这里有两个不同的,完全不相关的问题。 pathdef问题是一个IT问题,而不是MATLAB问题。第二个是MATLAB版本的差异。在R2014b之前,对象手柄是双打的。 – excaza

+0

@excaza,哦,我真的认为处理问题是Pathdef加载错误的后果,因为错误说:“警告:初始化句柄图形在matlabrc中失败。”和“restoredefaultpath; matlabrc”用于恢复本赛季。那么也许我可能会以某种方式使用函数和设置轴属性。 – Bjartmar

+1

'set'和'get'仍然可以使用手柄双打,这是他们的行为,直到R2014b。 – excaza

回答

1

C:\Program Files\MATLAB\R2013a\toolbox\local\pathdef.m: Cannot open file: permission denied.

错误的其余由它创建。即使是没有初始化的Java。

正如@excaza所说,它必定是一个IT故障。 MatLab正在到达该文件,但没有权限打开它。

尝试使用您的教练帐户并以管理员身份运行MatLab。一些教授可能拥有管理员权限。

"On a Windows® system with User Account Control (UAC) enabled, you might be prompted to allow the update operation because it requires administrator-level permission."

+0

感谢您的回答。看起来我拥有管理员权限。我运行Matlab和管理员。我没有收到同样的错误。只是一些其他错误的列表,f.ex. '警告:名称不存在或不是目录:D:\ Folder \ Subfolder \ otherusername',现在工具箱和缺少的功能正常工作。 – Bjartmar