Error in matlab.gra​phics.inte​rnal.figfi​le.FigFile​/read>@(hO​bject,even​tdata)unti​tled('push​button1_Ca​llback',hO​bject,even​tdata,guid​ata(hObjec​t)) Error while evaluating UIContr

4 views (last 30 days)
function varargout = untitled(varargin)
% UNTITLED MATLAB code for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLED.M with the given input arguments.
%
% UNTITLED('Property','Value',...) creates a new UNTITLED or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Copyright 2002-2014 The MathWorks, Inc.
% Edit the above text to modify the response to help untitled
% Last Modified by GUIDE v2.5 09-Mar-2024 21:52:21
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled_OpeningFcn, ...
'gui_OutputFcn', @untitled_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before untitled is made visible.
function untitled_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitled wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = untitled_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% penggunaan variabel x, y dan z
% str2num > fungsi untuk merubah input stringke numerik agar dapat diolah
x=str2num(get(handles.edit1,'String'));
y=str2num(get(handles.edit2,'String'));
z=str2num(get(handles.edit3,'String'));
% volume > deskripsi variabel
volume=x*y*z;
% kode untuk menampilkan hasil output variabel volume ke edit4
set(handles.edit4,'String',volume);
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'string') returns contents of edit6 as text
% str2double (get (hObject, 'string')) returns content of edit6 as a double
% --- Executes during object creation, after setting all properties.
function edit6_CreateFcn(x, y, z)
% hObject handle to edit6 (see GCBO)
% event data reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on windows.
% see ISPC and COMPUTER.
if ispc && isequal (get(x,'BackgroundColor')),
get(0,'defaultUicontrolBackgroundColor')
set(x,'Backgroundcolor','white');
end
function edit7_Callback(x, y, z)
% hObject handle to edit7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: (get(hObject, 'String')) returns contents of edit7 as text
% str2double(get(hObject,'string')) returns contents of edit7 as a double
% --- Executes during object creation, after setting all properties.
function edit7_CreateFcn(x, y, z)
% hObject handle to edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created untul after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(x,'BackgroundColor')),
get(0,'defaultUicontrolBackgroundColor')
set(x,'BackgroundColor','white');
end
function edit8_Callback(x, y, z)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handless and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit8 as text
% str2double(get(hObject,'String')) returnscontents of edit8 as a double
% --- Execute during object creation, after setting all properties.
function edit8_CreateFcn(x, y, z)
% hObject handle to edit8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% see ISPC and COMPUTER.
if ispc && isequal(get(x,'BackgroundColor')),
get(0,'defaultUicontrolBackground')
set(x,'BackgroundColor','white');
end
function edit10_Callback(x, y, z)
% hObject handle to edit10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of edit10 as text
% str2double(get(hObject,'String')) returns contents of edit10 as a double
% --- Executes during object creation, after setting all properties.
function edit10_CreateFcn(x, y, z)
% hObject handle to edit10 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on windows.
% See ISPC and COMPUTER
if ispc && isequal(get(x, 'BackgroundColor')),
get(0,'defaultUicontrolBackgroundColor')
set(x,'BackgroundColor','white');
end

Answers (1)

Walter Roberson
Walter Roberson on 9 Mar 2024
The .fig file was saved containing a reference to push​button1_Ca​llback but there is no push​button1_Ca​llback defined in your code.

Categories

Find more on Shifting and Sorting Matrices 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!