whutmemory 发表于 2011-7-20 23:24:00

出现错误提示“??? Unable to find subsindex function for class cell.”

??? Unable to find subsindex function for class cell.

Error in ==> D:\MATLAB6p5\work\utilities\VA1Demo.m (update_object_list)
On line 46==> eval(strcat('class_id = ',handles.commandname(selected,:),';'));

Error in ==> D:\MATLAB6p5\work\utilities\VA1Demo.m (VA1Demo_OpeningFcn)
On line 122==> update_object_list(hObject,handles);

Error in ==> D:\MATLAB6p5\toolbox\matlab\uitools\gui_mainfcn.m
On line 141==>   feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});

Error in ==> D:\MATLAB6p5\work\utilities\VA1Demo.m
On line 33==>   gui_mainfcn(gui_State, varargin{:});
错误提示如上所示,求解。恳请高手和热心人士帮助啊。

whutmemory 发表于 2011-7-21 09:04:47

1# whutmemory 自己先顶一下。在网上看到说是由于变量名和matlab已有的函数名相同才出现这种错误,但是看了半天不知道哪个变量名冲突了。

whutmemory 发表于 2011-7-21 09:13:51

2# whutmemory Subject:Why do I receive the error message: "??? Unable to find subsindex function for class char"?
Problem Description:??? Unable to find subsindex function for class char
??? Unable to find subsindex function for class struct
??? Unable to find subsindex function for class cell

In MATLAB 6.1 and previous versions, I can reproduce this error message using the following code:
set='abc'
set(gcf,'position')


Solution:This error occurs when a variable has the same name as a MATLAB function. For example, this error would occur if a variable in my MATLAB code was named SET, which is also a MATLAB function.

To determine if a particular variable is also a MATLAB function, you can use the which -all command. For example:
which set -all

If it outputs both a variable name and a filename that is under the MATLAB path, then you will need to rename your variable.

这是mathworks的官网找到的。不知class cell和class char有什么区别。


qibbxxt 发表于 2012-1-6 15:11:16

请你给出具体的代码,以方便调试
页: [1]
查看完整版本: 出现错误提示“??? Unable to find subsindex function for class cell.”