function varargout = calc3(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @calc3_OpeningFcn, ...
'gui_OutputFcn', @calc3_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
function calc3_OpeningFcn(hObject, eventdata, handles, varargin)
axes('Units','normalized','Position',[0 0 1 1]);
x=imread('cilindro.jpg');
image(x),axis off
handles.output = hObject;
guidata(hObject, handles);
function varargout = calc3_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function edit1_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit1=NewVal;
guidata(hObject,handles);
function edit1_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit2_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit2=NewVal;
guidata(hObject,handles);
function edit2_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit3_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit3=NewVal;
guidata(hObject,handles);
function edit3_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit4_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit4=NewVal;
guidata(hObject,handles);
function edit4_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function pushbutton1_Callback(hObject, eventdata, handles)
calc1
clear,clc,close(calc3)
function pushbutton2_Callback(hObject, eventdata, handles)
ini=char(' ');
set(handles.edit2,'String',ini);
set(handles.edit2,'String',ini);
set(handles.edit3,'String',ini);
set(handles.edit4,'String',ini);
set(handles.edit5,'String',ini);
set(handles.edit6,'String',ini);
function pushbutton3_Callback(hObject, eventdata, handles)
A=handles.edit1;
B=handles.edit2;
C=handles.edit3;
D=handles.edit5;
E=handles.edit4;
F=handles.edit6;
gapmax=A-D-((E+B)/2)+F;
set(handles.text8,'String',gapmax);
gapmin=D-((C-B)/2);
set(handles.text10,'String',gapmin);
function edit5_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit5=NewVal;
guidata(hObject,handles);
function edit5_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function edit6_Callback(hObject, eventdata, handles)
Val=get(hObject,'String');
NewVal=str2double(Val);
handles.edit6=NewVal;
guidata(hObject,handles);
function edit6_CreateFcn(hObject, eventdata, handles)
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function checkbox1_Callback(hObject, eventdata, handles)
function checkbox2_Callback(hObject, eventdata, handles)