TOOLBOX_MFO HAS
5 views (last 30 days)
Show older comments
hello all
when I have run the MFO toolbox I usually get this error
Dot indexing is not supported for variables of this type.
Error in MFO_toolbox>pushbutton1_Callback (line 262)
SearchAgents_no=str2num(get(handles.WolfNo,'String'));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MFO_toolbox (line 51)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MFO_toolbox('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
>> MFO_toolbox
Attempt to execute SCRIPT MFO as a function:
C:\Users\asus\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\Moth-flame Optimization (MFO) Algorithm
toolbox\Moth Flame Optimization algorithm Toolbox\MFO.m
Error in MFO_toolbox>pushbutton1_Callback (line 274)
[Best_score,Best_pos,cg_curve]=MFO(SearchAgents_no,Max_iteration,lb,ub,dim,fobj,handles,value);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in MFO_toolbox (line 51)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)MFO_toolbox('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
>>
0 Comments
Answers (1)
Geoff Hayes
on 20 Jun 2022
@bahar vojdani - I suspect that you are launching the MFO_toolbox.fig (figure) and not running the MFO_toolbox.m file (in fact, I see the same error Dot indexing is not supported for variables of this type if I double-click or open the figure file and pres the Start Optimization button). There are two files for GUIs created with GUIDE: the figure and the m-file (code). To launch the GUI, you must either type (from the command line)
>> MFO_toolbox
or open the MFO_toolbox.m file in the MATAB file editor and press the greeen run button.
You may have done this already (your log output seems to suggest it) but it isn't clear to me why you are observing the second error Attempt to execute SCRIPT MFO as a function unless you have modified the code. I just downloaded this toolbox from the MATLAB File Exchange and it worked fine for me.
0 Comments
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!