function varargout = PSD_main(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @PSD_main_OpeningFcn, ...
'gui_OutputFcn', @PSD_main_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 PSD_main is made visible.
function PSD_main_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
function varargout = PSD_main_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUI
function figure1_WindowButtonMotionFcn(hObject, eventdata, handles)
% hObject handle to figure1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
posicionmouse = get(hObject,'CurrentPoint');
dimension = get(handles.pushbutton1,'Position');
limx = [dimension(1) dimension(1)+dimension(3)];
limy = [dimension(2) dimension(2)+dimension(2)];
if ((posicionmouse(1)>=limx(1))&(posicionmouse(1)<=limx(2)))&((posicionmouse(2)>=limy(1))&(posicionmouse(2)<=limy(2)))
set(handles.pushbutton1,'Enable','on');
else
set(handles.pushbutton1,'Enable','off');
end