Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function varargout = tampilan2(varargin)
- % TAMPILAN2 MATLAB code for tampilan2.fig
- % TAMPILAN2, by itself, creates a new TAMPILAN2 or raises the existing
- % singleton*.
- %
- % H = TAMPILAN2 returns the handle to a new TAMPILAN2 or the handle to
- % the existing singleton*.
- %
- % TAMPILAN2('CALLBACK',hObject,eventData,handles,...) calls the local
- % function named CALLBACK in TAMPILAN2.M with the given input arguments.
- %
- % TAMPILAN2('Property','Value',...) creates a new TAMPILAN2 or raises the
- % existing singleton*. Starting from the left, property value pairs are
- % applied to the GUI before tampilan2_OpeningFcn gets called. An
- % unrecognized property name or invalid value makes property application
- % stop. All inputs are passed to tampilan2_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
- % Edit the above text to modify the response to help tampilan2
- % Last Modified by GUIDE v2.5 30-May-2014 07:53:31
- % Begin initialization code - DO NOT EDIT
- gui_Singleton = 1;
- gui_State = struct('gui_Name', mfilename, ...
- 'gui_Singleton', gui_Singleton, ...
- 'gui_OpeningFcn', @tampilan2_OpeningFcn, ...
- 'gui_OutputFcn', @tampilan2_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 tampilan2 is made visible.
- function tampilan2_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 tampilan2 (see VARARGIN)
- % Choose default command line output for tampilan2
- handles.output = hObject;
- % Update handles structure
- guidata(hObject, handles);
- % UIWAIT makes tampilan2 wait for user response (see UIRESUME)
- % uiwait(handles.figure1);
- % --- Outputs from this function are returned to the command line.
- function varargout = tampilan2_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 pushbutton_balik.
- function pushbutton_balik_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_balik (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- GUI_1_handle = tampilan1; % open GUI_1 and save the handle
- %delete(get(hObject, 'parent')); % close GUI_1
- %====================================================================================%
- % --- Executes on button press in pushbutton_lanjut.
- function pushbutton_lanjut_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_lanjut (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- %====================================================================================%
- % --- Executes on button press in pushbutton_ap1.
- function pushbutton_ap1_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_ap1 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- [X,Y] = meshgrid(0:.1:3.0);
- Z = peaks(X,Y);
- pcolor(Z);
- colormap(jet(256));
- colorbar;
- caxis([1 10]);
- shading(gca,'interp');
- grid on;
- hold;
- handles.axes2;
- set(gca,'layer','top');
- % --- Executes on button press in pushbutton_ap2.
- function pushbutton_ap2_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_ap2 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in pushbutton_ap3.
- function pushbutton_ap3_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_ap3 (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % --- Executes on button press in pushbutton_hapus.
- function pushbutton_hapus_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_hapus (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % close all;
- %clear all;
- cla;
- % --- Executes on button press in pushbutton_denah.
- function pushbutton_denah_Callback(hObject, eventdata, handles)
- % hObject handle to pushbutton_denah (see GCBO)
- % eventdata reserved - to be defined in a future version of MATLAB
- % handles structure with handles and user data (see GUIDATA)
- % tampilkan denah
- % X
- for i = 1.5:7;
- cur_x = i * 3.8;
- line([cur_x, cur_x], [0 5], 'color', 'r', 'LineWidth', 1.5);
- % drawnow;
- end;
- % Y
- for i = 2:7;
- cur_y = i * 4;
- line([0 4],[cur_y, cur_y], 'color', 'r', 'LineWidth', 1.5);
- % drawnow;
- end;
- % X2
- for i = 1.5:7;
- cur_x2 = i * 3.8;
- line([cur_x2, cur_x2], [25 30], 'color', 'r', 'LineWidth', 1.5);
- % drawnow;
- end;
- % Y2
- for i = 1:8;
- cur_y2 = i * 3.5;
- line([26 30],[cur_y2, cur_y2], 'color', 'r', 'LineWidth', 1.5);
- % drawnow;
- end;
- % X
- line( [5.7 cur_x], [5 5], 'color', 'r', 'LineWidth', 1.5);
- % Y
- line( [4 4], [8 cur_y], 'color', 'r', 'LineWidth', 1.5);
- % X2
- line( [5.6 cur_x2], [25 25], 'color', 'r', 'LineWidth', 1.5);
- % Y2
- line( [26 26], [3.5 cur_y2], 'color', 'r', 'LineWidth', 1.5);
- handles.axes2;
- grid on;
- hold all;
- axis tight;
- axis([0 30 0 30]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement