Created
May 19, 2020 11:56
-
-
Save AmirBikchentaev/8eb2b616074d7ad8a8b4574f568ad5b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function varargout = Bikchentaev(varargin) | |
gui_Singleton = 1; | |
gui_State = struct('gui_Name', mfilename, ... | |
'gui_Singleton', gui_Singleton, ... | |
'gui_OpeningFcn', @abubakirov_2_OpeningFcn, ... | |
'gui_OutputFcn', @abubakirov_2_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 abubakirov_2 is made visible. | |
function Bikchentaev_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 abubakirov_2 (see VARARGIN) | |
% Choose default command line output for abubakirov_2 | |
handles.output = hObject; | |
% Update handles structure | |
guidata(hObject, handles); | |
% UIWAIT makes abubakirov_2 wait for user response (see UIRESUME) | |
% uiwait(handles.figure1); | |
% --- Outputs from this function are returned to the command line. | |
function varargout = abubakirov_2_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 pushbutton1. | |
function pushbutton1_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton1 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
x=-2:0.02:2; | |
y=exp(-x.^2); | |
handles.Line = plot(x,y); | |
guidata(gcbo,handles); | |
set(hObject, 'Enable', 'off') | |
set(handles.pushbutton2, 'Enable', 'on') | |
set(handles.pushbutton3, 'Enable', 'on') | |
set(handles.pushbutton4, 'Enable', 'on') | |
set(handles.pushbutton5, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.showX,'Enable','on'); | |
set(handles.showY,'Enable','on'); | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
if get(handles.squares, 'Value') | |
set(handles.Line, 'Marker', 's') | |
set(handles.squares, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.stars, 'Value') | |
set(handles.Line, 'Marker', '*') | |
set(handles.stars, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.clear, 'Value') | |
set(handles.clear, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
end | |
% --- Executes on button press in pushbutton2. | |
function pushbutton2_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton2 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
x=-2:0.02:2; | |
y=exp(-x.^3); | |
handles.Line = plot(x,y); | |
guidata(gcbo,handles); | |
set(hObject, 'Enable', 'off') | |
set(handles.pushbutton1, 'Enable', 'on') | |
set(handles.pushbutton3, 'Enable', 'on') | |
set(handles.pushbutton4, 'Enable', 'on') | |
set(handles.pushbutton5, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.showX,'Enable','on'); | |
set(handles.showY,'Enable','on'); | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
if get(handles.squares, 'Value') | |
set(handles.Line, 'Marker', 's') | |
set(handles.squares, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.stars, 'Value') | |
set(handles.Line, 'Marker', '*') | |
set(handles.stars, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.clear, 'Value') | |
set(handles.clear, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
end | |
% --- Executes on button press in pushbutton3. | |
function pushbutton3_Callback(hObject, eventdata, handles) | |
% 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) | |
x=-2:0.02:2; | |
y=exp(x.^2); | |
handles.Line = plot(x,y); | |
guidata(gcbo,handles); | |
set(hObject, 'Enable', 'off') | |
set(handles.pushbutton1, 'Enable', 'on') | |
set(handles.pushbutton2, 'Enable', 'on') | |
set(handles.pushbutton4, 'Enable', 'on') | |
set(handles.pushbutton5, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.showX,'Enable','on'); | |
set(handles.showY,'Enable','on'); | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
if get(handles.squares, 'Value') | |
set(handles.Line, 'Marker', 's') | |
set(handles.squares, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.stars, 'Value') | |
set(handles.Line, 'Marker', '*') | |
set(handles.stars, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.clear, 'Value') | |
set(handles.clear, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
end | |
% --- Executes on button press in pushbutton4. | |
function pushbutton4_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton4 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
x=-2:0.02:2; | |
y=exp(x.^3); | |
handles.Line = plot(x,y); | |
guidata(gcbo,handles); | |
set(hObject, 'Enable', 'off') | |
set(handles.pushbutton1, 'Enable', 'on') | |
set(handles.pushbutton2, 'Enable', 'on') | |
set(handles.pushbutton3, 'Enable', 'on') | |
set(handles.pushbutton5, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.showX,'Enable','on'); | |
set(handles.showY,'Enable','on'); | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
if get(handles.squares, 'Value') | |
set(handles.Line, 'Marker', 's') | |
set(handles.squares, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.stars, 'Value') | |
set(handles.Line, 'Marker', '*') | |
set(handles.stars, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.clear, 'Value') | |
set(handles.clear, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
end | |
% --- Executes on button press in pushbutton5. | |
function pushbutton5_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton5 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
x=-2:0.02:2; | |
y=exp(x.^2+5); | |
handles.Line = plot(x,y); | |
guidata(gcbo,handles); | |
set(hObject, 'Enable', 'off') | |
set(handles.pushbutton1, 'Enable', 'on') | |
set(handles.pushbutton2, 'Enable', 'on') | |
set(handles.pushbutton3, 'Enable', 'on') | |
set(handles.pushbutton4, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.showX,'Enable','on'); | |
set(handles.showY,'Enable','on'); | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
if get(handles.squares, 'Value') | |
set(handles.Line, 'Marker', 's') | |
set(handles.squares, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.stars, 'Value') | |
set(handles.Line, 'Marker', '*') | |
set(handles.stars, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.clear,'Enable','on') | |
end | |
if get(handles.clear, 'Value') | |
set(handles.clear, 'Enable', 'inactive') | |
set(handles.stars, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
end | |
% --- Executes on button press in pushbutton6. | |
function pushbutton6_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton6 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
cla | |
set(handles.pushbutton1, 'Enable', 'on') | |
set(handles.pushbutton2, 'Enable', 'on') | |
set(handles.pushbutton3, 'Enable', 'on') | |
set(handles.pushbutton4, 'Enable', 'on') | |
set(handles.pushbutton5, 'Enable', 'on') | |
set(handles.pushbutton6, 'Enable', 'on') | |
set(handles.clear,'Enable','off') | |
set(handles.stars,'Enable','off') | |
set(handles.squares,'Enable','off') | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
% --- Executes on button press in stars. | |
function stars_Callback(hObject, eventdata, handles) | |
% hObject handle to stars (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
% Hint: get(hObject,'Value') returns toggle state of stars | |
set(handles.Line, 'Marker' ,'*') | |
set(hObject, 'Enable', 'inactive') | |
set(handles.clear, 'Enable', 'on') | |
set(handles.squares, 'Enable', 'on') | |
% --- Executes on button press in showX. | |
function showX_Callback(hObject, eventdata, handles) | |
% hObject handle to showX (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
% Hint: get(hObject,'Value') returns toggle state of showX | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
% --- Executes on button press in showY. | |
function showY_Callback(hObject, eventdata, handles) | |
% hObject handle to showY (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
% Hint: get(hObject,'Value') returns toggle state of showY | |
if get(handles.showX, 'Value') | |
set(gca, 'XGrid', 'on') | |
else | |
set(gca, 'XGrid', 'off') | |
end | |
if get(handles.showY, 'Value') | |
set(gca, 'YGrid', 'on') | |
else | |
set(gca, 'YGrid', 'off') | |
end | |
% --- Executes on button press in squares. | |
function squares_Callback(hObject, eventdata, handles) | |
% hObject handle to squares (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
% Hint: get(hObject,'Value') returns toggle state of squares | |
set(handles.Line, 'Marker' ,'s') | |
set(hObject, 'Enable', 'inactive') | |
set(handles.clear, 'Enable', 'on') | |
set(handles.stars, 'Enable', 'on') | |
% --- Executes on button press in clear. | |
function clear_Callback(hObject, eventdata, handles) | |
% hObject handle to clear (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
% Hint: get(hObject,'Value') returns toggle state of clear | |
set(handles.Line, 'Marker' ,'none') | |
set(hObject, 'Enable', 'inactive') | |
set(handles.squares, 'Enable', 'on') | |
set(handles.stars, 'Enable', 'on') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment