📄 convexpogui.m
字号:
function varargout = convexpogui(varargin)% CONVEXPOGUI M-file for convexpogui.fig% CONVEXPOGUI, by itself, creates a new CONVEXPOGUI or raises the existing% singleton*.%% H = CONVEXPOGUI returns the handle to a new CONVEXPOGUI or the handle to% the existing singleton*.%% CONVEXPOGUI('CALLBACK',hObject,eventData,handles,...) calls the local% function named CALLBACK in CONVEXPOGUI.M with the given input arguments.%% CONVEXPOGUI('Property','Value',...) creates a new CONVEXPOGUI or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before convexpogui_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to convexpogui_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 convexpogui% Last Modified by GUIDE v2.5 27-Apr-2004 13:36:39% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @convexpogui_OpeningFcn, ... 'gui_OutputFcn', @convexpogui_OutputFcn, ... 'gui_LayoutFcn', @convexpogui_LayoutFcn, ... 'gui_Callback', []);if nargin & isstr(varargin{1}) gui_State.gui_Callback = str2func(varargin{1});endif 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 convexpogui is made visible.function convexpogui_OpeningFcn(hObject, eventdata, handles, varargin) handles.output = hObject; set(gcf,'UserData',handles); guidata(hObject, handles); convexpofn; if nargin > 3 datastruct = varargin{1}; convexpofn('readinput',datastruct); end% --- Outputs from this function are returned to the command line.function varargout = convexpogui_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 stepback.function stepback_Callback(hObject, eventdata, handles) convexpofn('stepback');% --- Executes on button press in stepforw.function stepforw_Callback(hObject, eventdata, handles) convexpofn('stepforw');% --- Executes during object creation, after setting all properties.function width1_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction width1_Callback(hObject, eventdata, handles) convexpofn('width1');% --- Executes during object creation, after setting all properties.function width2_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction width2_Callback(hObject, eventdata, handles) convexpofn('width2');% --- Executes during object creation, after setting all properties.function length1_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction length1_Callback(hObject, eventdata, handles) convexpofn('length1');% --- Executes during object creation, after setting all properties.function length2_CreateFcn(hObject, eventdata, handles)if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction length2_Callback(hObject, eventdata, handles) convexpofn('length2');% --- Executes on button press in play.function play_Callback(hObject, eventdata, handles) convexpofn('play');% --- Executes on button press in reset.function reset_Callback(hObject, eventdata, handles) convexpofn('reset');% --- Executes during object creation, after setting all properties.function pulse1_type_CreateFcn(hObject, eventdata, handles)% hObject handle to pulse1_type (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 pulse1_type.function pulse1_type_Callback(hObject, eventdata, handles) convexpofn('pulse1');% --- Executes during object creation, after setting all properties.function pulse2_type_CreateFcn(hObject, eventdata, handles)% hObject handle to pulse2_type (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 pulse2_type.function pulse2_type_Callback(hObject, eventdata, handles) convexpofn('pulse2'); contents = get(hObject,'String'); switch contents{get(hObject,'Value')} case 'custom' %set(handles.width2,'Enable','inactive'); otherwise set(handles.width2,'Enable','on'); end% --- Executes on button press in showshape.function showshape_Callback(hObject, eventdata, handles) convexpofn('showshape');% --- Executes on button press in grid.function grid_Callback(hObject, eventdata, handles) convexpofn('grid');% --- Executes during object creation, after setting all properties.function edit5_CreateFcn(hObject, eventdata, handles)% hObject handle to edit5 (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.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction edit5_Callback(hObject, eventdata, handles)% hObject handle to edit5 (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 edit5 as text% str2double(get(hObject,'String')) returns contents of edit5 as a double% --- Executes on button press in cyclic.function cyclic_Callback(hObject, eventdata, handles) convexpofn 'cyclic';% --------------------------------------------------------------------function help_Callback(hObject, eventdata, handles)% hObject handle to help (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA) convexpofn 'help';% --- Creates and returns a handle to the GUI figure. function h1 = convexpogui_LayoutFcn(policy)% policy - create a new figure or use a singleton. 'new' or 'reuse'.persistent hsingleton;if strcmpi(policy, 'reuse') & ishandle(hsingleton) h1 = hsingleton; return;endh1 = figure(...'Units','characters',...'Color',[0.701960784313725 0.701960784313725 0.701960784313725],...'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],...'DoubleBuffer','on',...'IntegerHandle','off',...'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),...'MenuBar','none',...'Name','convexpo',...'NumberTitle','off',...'PaperPosition',[0.25 2.5 8 8],...'Position',[103.8 23.5961538461538 102.4 42.6153846153846],...'Renderer',get(0,'defaultfigureRenderer'),...'RendererMode','manual',...'HandleVisibility','callback',...'Tag','convexpo_fig',...'UserData',[]);setappdata(h1, 'GUIDEOptions',struct(...'active_h', [], ...'taginfo', struct(...'figure', 2, ...'text', 16, ...'axes', 4, ...'pushbutton', 6, ...'edit', 6, ...'frame', 3, ...'popupmenu', 3, ...'checkbox', 4), ...'override', 1, ...'release', 13, ...'resize', 'simple', ...'accessibility', 'callback', ...'mfile', 1, ...'callbacks', 1, ...'singleton', 1, ...'syscolorfig', 1, ...'lastSavedFile', '/Users/bobsturm/gibson/SSUM/convolution/convexpo.m', ...'blocking', 0));h2 = uicontrol(...'Parent',h1,...'Units','characters',...'ListboxTop',0,...'Position',[79.7948717948718 14.6097046413502 20.9230769230769 11.0198915009042],...'String',{ '' },...'Style','frame',...'Tag','frame2');h3 = uicontrol(...'Parent',h1,...'Units','characters',...'ListboxTop',0,...'Position',[79.7948717948718 25.9635322483424 20.9230769230769 11.0198915009042],...'String',{ '' },...'Style','frame',...'Tag','frame1');h4 = uicontrol(...'Parent',h1,...'Units','characters',...'FontSize',12,...'HorizontalAlignment','left',...'ListboxTop',0,...'Position',[81.6 29 10.2 1.5],...'String','Width',...'Style','text',...'Tag','text8');h5 = axes(...'Parent',h1,...'Units','characters',...'CameraPosition',[0.5 0.5 9.16025403784439],...'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),...'Color',get(0,'defaultaxesColor'),...'ColorOrder',get(0,'defaultaxesColorOrder'),...'Position',[5.53846153846154 25.9635322483424 73.6410256410257 11.0198915009042],...'XColor',get(0,'defaultaxesXColor'),...'YColor',get(0,'defaultaxesYColor'),...'ZColor',get(0,'defaultaxesZColor'),...'Tag','axes1');h6 = get(h5,'title');set(h6,...'Parent',h5,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[0.5 1.04924242424242 1.00005459937205],...'VerticalAlignment','bottom',...'HandleVisibility','off');h7 = get(h5,'xlabel');set(h7,...'Parent',h5,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[0.497214484679666 -0.178030303030303 1.00005459937205],...'VerticalAlignment','cap',...'HandleVisibility','off');h8 = get(h5,'ylabel');set(h8,...'Parent',h5,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[-0.0654596100278552 0.488636363636364 1.00005459937205],...'Rotation',90,...'VerticalAlignment','bottom',...'HandleVisibility','off');h9 = get(h5,'zlabel');set(h9,...'Parent',h5,...'Color',[0 0 0],...'HorizontalAlignment','right',...'Position',[-0.0766016713091922 1.49621212121212 1.00005459937205],...'HandleVisibility','off',...'Visible','off');h10 = axes(...'Parent',h1,...'Units','characters',...'CameraPosition',[0.5 0.5 9.16025403784439],...'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),...'Color',get(0,'defaultaxesColor'),...'ColorOrder',get(0,'defaultaxesColorOrder'),...'Position',[5.53846153846154 14.6097046413502 73.6410256410257 11.0198915009042],...'XColor',get(0,'defaultaxesXColor'),...'YColor',get(0,'defaultaxesYColor'),...'ZColor',get(0,'defaultaxesZColor'),...'Tag','axes2');h11 = get(h10,'title');set(h11,...'Parent',h10,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[0.5 1.04924242424242 1.00005459937205],...'VerticalAlignment','bottom',...'HandleVisibility','off');h12 = get(h10,'xlabel');set(h12,...'Parent',h10,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[0.497214484679666 -0.178030303030303 1.00005459937205],...'VerticalAlignment','cap',...'HandleVisibility','off');h13 = get(h10,'ylabel');set(h13,...'Parent',h10,...'Color',[0 0 0],...'HorizontalAlignment','center',...'Position',[-0.0654596100278552 0.488636363636364 1.00005459937205],...'Rotation',90,...'VerticalAlignment','bottom',...'HandleVisibility','off');h14 = get(h10,'zlabel');set(h14,...'Parent',h10,...'Color',[0 0 0],...'HorizontalAlignment','right',...'Position',[-0.0766016713091922 2.52651515151515 1.00005459937205],...'HandleVisibility','off',...'Visible','off');h15 = axes(...'Parent',h1,...'Units','characters',...'CameraPosition',[0.5 0.5 9.16025403784439],...'CameraPositionMode',get(0,'defaultaxesCameraPositionMode'),...'Color',get(0,'defaultaxesColor'),...'ColorOrder',get(0,'defaultaxesColorOrder'),...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -