Getting error in my GUI when I run it
Mostrar comentarios más antiguos
I'm trying to run my GUI, but I get the error:
The class handle has no Constant property or Static method named 'mcub'.
Error in interfaz_parte3_1>calcular_Callback (line 173)
y=str2num(get(handle.mcub,'string'));
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in interfaz_parte3_1 (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)interfaz_parte3_1('calcular_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
I think is the way I'm introducing vectors.
This is part of my code:
% --- Executes on button press in calculate.
function calcular_Callback(hObject, eventdata, handles)
% hObject handle to calcular (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
costo=str2double(get(handle.costo,'string'));
y=str2double(get(handle.mcub,'string'));
x=str2double(get(handle.semanas,'string'));
CO=str2double(get(handle.bodega, 'string'));
where "y" and "x" are introduced as vectors (numbers) in an Edit box.
What is wrong with the vectors? How do I have to introduce them, or what do I have to change in the code so it can be read and used in the code as an input of a vector of numbers.
e.g. input=[1 2 3 4]
6 comentarios
JESUS DAVID ARIZA ROYETH
el 3 de Mayo de 2018
Cristina puedes adjuntar tus archivos? can you attach your files?
if you want to read vectors in an Editbox use "str2num" instead of "str2double" / si quieres leer vectores en un Editbox utiliza "str2num" en vez de "str2double" :
cost=str2num(get(handle.cost,'string'));
y=str2num(get(handle.mcub,'string'));
x=str2num(get(handle.semanas,'string'));
CO=str2num(get(hObject, 'string'));
Jan
el 3 de Mayo de 2018
Please post the complete error message.
Cristina Ortiz
el 3 de Mayo de 2018
Editada: Cristina Ortiz
el 3 de Mayo de 2018
Jan
el 3 de Mayo de 2018
This is a rare example of a useless error message. It does neither tell in which line the error occurs, nor what the problem is. Are you sure that there are not more details?
Please tell us, when the error occurs. What do you do before?
Cristina Ortiz
el 3 de Mayo de 2018
Editada: Walter Roberson
el 3 de Mayo de 2018
Cristina Ortiz
el 3 de Mayo de 2018
Editada: Cristina Ortiz
el 3 de Mayo de 2018
Respuesta aceptada
Más respuestas (1)
DINESH KUMAR M
el 28 de Mzo. de 2021
Unable to resolve the name vision.CascadeObjectDetector.
Error in main>BR_OWSE_Callback (line 647)
fd = vision.CascadeObjectDetector();
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in main (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)main('BR_OWSE_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating Menu Callback.
>> matlab.graphics.internal.figfile.FigFile.read
The class matlab.graphics.internal.figfile.FigFile has no Constant property or Static method named 'read'.
>>
How to solve this pblm ?
1 comentario
Walter Roberson
el 28 de Mzo. de 2021
That function requires the Computer Vision Toolbox, R2012a or later
Categorías
Más información sobre Spreadsheets en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!