Dear all,
I am new Matlab user, and I am using TOMCAT toolbox GUI, but I can't seem to import data either .mat file or from the workspace. It gives me the following error:
No public field (my data) for class matlab.graphics.Graphics.
Error in TOMCAT>import_form_workspace_Callback (line 145)
data.(content{selection(i)})=evalin('base',content{selection(i)});
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in TOMCAT (line 28)
gui_mainfcn(gui_State, varargin{:});
Error while evaluating Menu Callback
I think the error comes from this part of the GUI code:
function import_form_workspace_Callback(hObject, eventdata, handles)
data=get(gcf,'Userdata');
content=evalin('base','who');
[selection,ok]=listdlg('PromptString','Select data to import:','Name','Data selection',... 'SelectionMode','multiple','ListString',content);
if ok==0; return; end
for i=1:length(selection)
data.(content{selection(i)})=evalin('base',content{selection(i)});
end
set(gcf,'Userdata',data)
Is there anyone who has encountered similar problem and aware of the solution? I appreciate very much any help. I am using Matlab R2014b. Thank you.
I am new Matlab user, and I am using TOMCAT toolbox GUI, but I can't seem to import data either .mat file or from the workspace. It gives me the following error:
No public field (my data) for class matlab.graphics.Graphics.
Error in TOMCAT>import_form_workspace_Callback (line 145)
data.(content{selection(i)})=evalin('base',content{selection(i)});
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in TOMCAT (line 28)
gui_mainfcn(gui_State, varargin{:});
Error while evaluating Menu Callback
I think the error comes from this part of the GUI code:
function import_form_workspace_Callback(hObject, eventdata, handles)
data=get(gcf,'Userdata');
content=evalin('base','who');
[selection,ok]=listdlg('PromptString','Select data to import:','Name','Data selection',... 'SelectionMode','multiple','ListString',content);
if ok==0; return; end
for i=1:length(selection)
data.(content{selection(i)})=evalin('base',content{selection(i)});
end
set(gcf,'Userdata',data)
Is there anyone who has encountered similar problem and aware of the solution? I appreciate very much any help. I am using Matlab R2014b. Thank you.