您当前位置: 首页 » 数据结构 & 算法 » matlab » 音视频_图像相关 » 图像处理 » 数据结构 & 算法 » 音视频_图像相关 » 【Matlab、安装问题、路径问题、环境问题】安装完matlab后,出现各种命令未定义的情况

【Matlab、安装问题、路径问题、环境问题】安装完matlab后,出现各种命令未定义的情况

2016-06-07 |

首次安装完matlab时,在导入授权后,打开发现一堆警告,各种命令不可用,大致内容如下:

Warning: C:\Program Files\MATLAB\R2012a\toolbox\local\pathdef.m not found.
Toolbox Path Cache is not being used. Type ‘help toolbox_path_cache’ for more info
Undefined function or variable ‘ispc’.
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\R2012a\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 113
Warning: Failed to add default profiler filters.
> In matlabrc at 168
>> rtwintgt -setup
Undefined function ‘rtwintgt’ for input arguments of type ‘char’.

>> help toolbox_path_cache
Undefined function ‘help’ for input arguments of type ‘char’.

 

实际上是安装的时候路径出错,用管理员模式启动,然后执行这个命令:

restoredefaultpath;matlabrc

matlab执行环境变量恢复以后,系统正常可用。