为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

菲波纳契光栅衍射GUI程序代码

2019-08-18 12页 doc 34KB 22阅读

用户头像

is_511210

暂无简介

举报
菲波纳契光栅衍射GUI程序代码function varargout = fbnq_diffraction(varargin) %FBNQ_DIFFRACTION M-file for fbnq_diffraction.fig % FBNQ_DIFFRACTION, by itself, creates a new FBNQ_DIFFRACTION or raises the existing % singleton*. % % H = FBNQ_DIFFRACTION returns the handle to a new FBNQ_DIFFR...
菲波纳契光栅衍射GUI程序代码
function varargout = fbnq_diffraction(varargin) %FBNQ_DIFFRACTION M-file for fbnq_diffraction.fig % FBNQ_DIFFRACTION, by itself, creates a new FBNQ_DIFFRACTION or raises the existing % singleton*. % % H = FBNQ_DIFFRACTION returns the handle to a new FBNQ_DIFFRACTION or the handle to % the existing singleton*. % % FBNQ_DIFFRACTION('Property','Value',...) creates a new FBNQ_DIFFRACTION using the % given property value pairs. Unrecognized properties are passed via % varargin to fbnq_diffraction_OpeningFcn. This calling syntax produces a % warning when there is an existing singleton*. % % FBNQ_DIFFRACTION('CALLBACK') and FBNQ_DIFFRACTION('CALLBACK',hObject,...) call the % local function named CALLBACK in FBNQ_DIFFRACTION.M with the given input % arguments. % % *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 fbnq_diffraction % Last Modified by GUIDE v2.5 04-Nov-2011 18:32:44 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @fbnq_diffraction_OpeningFcn, ... 'gui_OutputFcn', @fbnq_diffraction_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 fbnq_diffraction is made visible. function fbnq_diffraction_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 unrecognized PropertyName/PropertyValue pairs from the % command line (see VARARGIN) % Choose default command line output for fbnq_diffraction handles.output = hObject; % Update handles structure guidata(hObject, handles); if strcmp(get(hObject,'Visible'),'off') initialize_gui(hObject, handles); end % UIWAIT makes fbnq_diffraction wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = fbnq_diffraction_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; function distance_Callback(hObject, eventdata, handles) % hObject handle to distance (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of distance as text % str2double(get(hObject,'String')) returns contents of distance as a double distance = str2double(get(hObject, 'String')); if isnan(distance) set(hObject, 'String', 100); errordlg('Input must be a number','Error'); end data = getappdata(gcbf, 'metricdata'); data.distance = distance; setappdata(gcbf, 'metricdata', data); % --- Executes during Object creation, after setting all properties. function distance_CreateFcn(hObject, eventdata, handles) % hObject handle to distance (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. usewhitebg = 1; if usewhitebg set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')) ; end function samspace_Callback(hObject, eventdata, handles) % hObject handle to samspace (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of samspace as text % str2double(get(hObject,'String')) returns contents of samspace as a double samspace = str2double(get(hObject, 'String')); if isnan(samspace) set(hObject, 'String', 100); errordlg('Input must be a number','Error'); end data = getappdata(gcbf, 'metricdata'); data.samspace = samspace; setappdata(gcbf, 'metricdata', data); % --- Executes during object creation, after setting all properties. function samspace_CreateFcn(hObject, eventdata, handles) % hObject handle to samspace (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. usewhitebg = 1; if usewhitebg set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')) ; end function Lamda_Callback(hObject, eventdata, handles) % hObject handle to Lamda (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of Lamda as text % str2double(get(hObject,'String')) returns contents of Lamda as a double Lamda = str2double(get(hObject, 'String')); if isnan(Lamda) set(hObject, 'String', 100); errordlg('Input must be a number','Error'); end data = getappdata(gcbf, 'metricdata'); data.Lamda = Lamda; setappdata(gcbf, 'metricdata', data); % --- Executes during object creation, after setting all properties. function Lamda_CreateFcn(hObject, eventdata, handles) % hObject handle to Lamda (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. usewhitebg = 1; if usewhitebg set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')) ; end function Da_Callback(hObject, eventdata, handles) % hObject handle to Da (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of Da as text % str2double(get(hObject,'String')) returns contents of Da as a double Da = str2double(get(hObject, 'String')); if isnan(Da) set(hObject, 'String', 100); errordlg('Input must be a number','Error'); end data = getappdata(gcbf, 'metricdata'); data.Da = Da; setappdata(gcbf, 'metricdata', data); % --- Executes during object creation, after setting all properties. function Da_CreateFcn(hObject, eventdata, handles) % hObject handle to Da (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER. usewhitebg = 1; if usewhitebg set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')) ; end function Db_Callback(hObject, eventdata, handles) % hObject handle to Db (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of Db as text % str2double(get(hObject,'String')) returns contents of Db as a double Db = str2double(get(hObject, 'String')); if isnan(Db) set(hObject, 'String', 100); errordlg('Input must be a number','Error'); end data = getappdata(gcbf, 'metricdata'); data.Db = Db; setappdata(gcbf, 'metricdata', data); % --- Executes during object creation, after setting all properties. function Db_CreateFcn(hObject, eventdata, handles) % hObject handle to Db (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB
/
本文档为【菲波纳契光栅衍射GUI程序代码】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索