Problem in running GUI
Mostra commenti meno recenti
I am creating a GUI for Newton Raphson method. The code I wrote works well but when it comes to GUI it shows strange error. following is the error. Could anyone tell me how to get solved this error.
newtonraphson
y =
1×1 cell array
{'sin(x)'}
Error using eval Must be a string scalar or character vector.
Error in newtonraphson>pushbutton1_Callback (line 109) yy=eval(y)
Error in gui_mainfcn (line 95) feval(varargin{:});
Error in newtonraphson (line 42) gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)newtonraphson('pushbutton1_Callback',hObject,eventdata,guidata(hObject)) Error while evaluating UIControl Callback.
I have attached the .fig file also, so that you can check it.
2 Commenti
Rik
il 15 Ott 2017
You did three things that is very effective in discouraging people to answer your question: very poor formatting, a wall of text and saying your problem is urgent.
Just looking at the last few lines I would say the error message tells you what you need to change: y is a cell containing a string, while it used in a function that expects a char vector.
Stephen23
il 18 Ott 2017
You are creating a GUI for the Newton-Raphson method, and you need slow, buggy, totally inefficient eval ? Why not simply stick to faster, simpler, and much more efficient numeric calculations ?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Functions in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
