TOOLBOX_MFO HAS

조회 수: 1 (최근 30일)
bahar vojdani
bahar vojdani 2022년 6월 20일
답변: Geoff Hayes 2022년 6월 20일
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.
>>

답변 (1개)

Geoff Hayes
Geoff Hayes 2022년 6월 20일
@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.

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by