in Regard of Feval error

3 views (last 30 days)
rahul
rahul on 22 Aug 2014
Commented: Walter Roberson on 23 Sep 2017
hi
i have come across the following error -
Error using feval
Undefined function 'viewpm_Callback' for input arguments of type 'struct'.
Error in gui_mainfcn (line 96)
feval(varargin{:});
Error in radar_waveform_analyzer_18july (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)radar_waveform_analyzer_18july('viewpm_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
when i go to callback function of viewpm( pop-up menu in gui) i get no code for dat, however the concerned code is elsewhere in .m file. although i m able to run the gui , but its functionality has been changed. i am also attaching .m code file.
pls contribute and resolve.
Thanks and Regards,
Rahul sharma
  5 Comments
Geoff Hayes
Geoff Hayes on 23 Sep 2017
Faith - you may want to provide more context. When does this error occur? Have you created your GUI with GUIDE, programmatically, or with App Designer?
Walter Roberson
Walter Roberson on 23 Sep 2017
Faith Mwiza:
You would get that error if you renamed your .m file instead of going through GUIDE and telling it to save as a new name.

Sign in to comment.

Accepted Answer

Geoff Hayes
Geoff Hayes on 26 Aug 2014
Rahul - I looked at the code in your attachment (next time, just attach the m-file - there is no need to paste its contents into an rtf file and zip it up).
The error
Error using feval Undefined function 'viewpm_Callback' for input arguments of type 'struct'.
Error in gui_mainfcn (line 96) feval(varargin{:});
Error in radar_waveform_analyzer_18july (line 42) gui_mainfcn(gui_State, varargin{:});
Error in @(hObject,eventdata)radar_waveform_analyzer_18july('viewpm_Callback',hObject,
eventdata,guidata(hObject))
Error while evaluating uicontrol Callback
indicates that the gui_mainfcn, which calls feval, cannot find the function viewpm_Callback. That is because this function (signature and body) is commented out in your attached file.
I created a simple GUI with a single pushbutton, and if I commented out its callback, then pressing the button resulted in the same error message that you observed.
I recommend that you uncomment this function, and try running the GUI again.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!