Sie sind auf Seite 1von 6

function varargout = rizki_08018048(varargin) % RIZKI_08018048 M-file for rizki_08018048.

fig % % % % % % % % % % % % % % % % % % % See also: GUIDE, GUIDATA, GUIHANDLES *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one instance to run (singleton)". RIZKI_08018048('Property','Value',...) creates a new RIZKI_08018048 or raises the existing singleton*. Starting from the left, property value pairs are applied to the GUI before rizki_08018048_OpeningFunction gets called. An unrecognized property name or invalid value makes property application stop. All inputs are passed to rizki_08018048_OpeningFcn via varargin. RIZKI_08018048('CALLBACK',hObject,eventData,handles,...) calls the local function named CALLBACK in RIZKI_08018048.M with the given input arguments. H = RIZKI_08018048 returns the handle to a new RIZKI_08018048 or the handle to the existing singleton*. RIZKI_08018048, by itself, creates a new RIZKI_08018048 or raises the existing singleton*.

% Edit the above text to modify the response to help rizki_08018048

% Last Modified by GUIDE v2.5 09-Mar-2010 21:41:05

% Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ...

'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @rizki_08018048_OpeningFcn, ... 'gui_OutputFcn', @rizki_08018048_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin & isstr(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 rizki_08018048 is made visible. function rizki_08018048_OpeningFcn(hObject, eventdata, handles, varargin) handles.peaks=peaks(35); handles.membrane=membrane;

[x,y] = meshgrid(-8:.5:8); r=sqrt(x.^2+y.^2)+eps; sinc = sin(r)./r; handles.sinc = sinc; handles.current_data = handles.peaks; surf(handles.current_data) % 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 rizki_08018048 (see VARARGIN)

% Choose default command line output for rizki_08018048 handles.output = hObject;

% Update handles structure guidata(hObject, handles);

% UIWAIT makes rizki_08018048 wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line. function varargout = rizki_08018048_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 surf_pushbutton. function surf_pushbutton_Callback(hObject, eventdata, handles) % hObject handle to surf_pushbutton (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) surf(handles.current_data);

% --- Executes on button press in mesh_pushbutton. function mesh_pushbutton_Callback(hObject, eventdata, handles) % hObject handle to mesh_pushbutton (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) mesh(handles.current_data);

% --- Executes on button press in contour_pushbutton. function contour_pushbutton_Callback(hObject, eventdata, handles) % hObject handle to contour_pushbutton (see GCBO)

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) contour(handles.current_data);

% --- Executes during object creation, after setting all properties. function data_popup_CreateFcn(hObject, eventdata, handles) % hObject handle to data_popup (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called

% Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.

if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end

% --- Executes on selection change in data_popup. function data_popup_Callback(hObject, eventdata, handles) % hObject handle to data_popup (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: contents = get(hObject,'String') returns data_popup contents as cell array % contents{get(hObject,'Value')} returns selected item from data_popup

val = get(hObject,'Value'); str = get(hObject,'String'); switch str{val}; case 'peaks' handles.current_data = handles.peaks; case 'membrane' handles.current_data = handles.membrane; case 'sinc' handles.current_data = handles.sinc; end guidata(hObject,handles) function simple_gui_OpeningFcn(hObject, eventdata, handles, varargin)

Das könnte Ihnen auch gefallen