📄 building_mode_export.m
字号:
function varargout = building_mode_export(varargin)% BUILDING_MODE_EXPORT M-file for building_mode_export.fig% BUILDING_MODE_EXPORT, by itself, creates a1 new BUILDING_MODE_EXPORT or raises the existing% singleton*.%% H = BUILDING_MODE_EXPORT returns the handle to a1 new BUILDING_MODE_EXPORT or the handle to% the existing singleton*.%% BUILDING_MODE_EXPORT('Property','Value',...) creates a1 new BUILDING_MODE_EXPORT using the% given property value pairs. Unrecognized properties are passed via% varargin to building_mode_export_OpeningFcn. This calling syntax produces a1% warning when there is an existing singleton*.%% BUILDING_MODE_EXPORT('CALLBACK') and BUILDING_MODE_EXPORT('CALLBACK',hObject,...) call the% local function named CALLBACK in BUILDING_MODE_EXPORT.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 building_mode_export% Last Modified by GUIDE v2.5 20-May-2006 11:29:37% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @building_mode_export_OpeningFcn, ... 'gui_OutputFcn', @building_mode_export_OutputFcn, ... 'gui_LayoutFcn', @building_mode_export_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 building_mode_export is made visible.function building_mode_export_OpeningFcn(hObject, eventdata, handles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a1 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 building_mode_exporthandles.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes building_mode_export wait for user response (see UIRESUME)% uiwait(handles.figure1); initialize_gui(hObject, handles);function initialize_gui(fig_handle, handles)set(handles.d, 'String', '');set(handles.p, 'String', '');set(handles.q, 'String', '');set(handles.A1, 'String', '');set(handles.B1, 'String', '');set(handles.A2, 'String', '');set(handles.B2, 'String','');set(handles.result, 'String', '');for ii=1:25 hold on a=[ii*6 ii*6]; b=[0 75]; plot(a,b,'g'); c=[0 150]; d=[ii*3 ii*3]; plot(c,d);endxlabel('wide(m)') %给X轴加标签ylabel('heiht(m)') %给Y轴加标签% --- Outputs from this function are returned to the command line.function varargout = building_mode_export_OutputFcn(hObject, eventdata, handles)% varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Get default command line output from handles structurevarargout{1} = handles.output;% --- Executes during object creation, after setting all properties.function d_CreateFcn(hObject, eventdata, handles)% hObject handle to d (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction d_Callback(hObject, eventdata, handles)% hObject handle to d (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of d as text% str2double(get(hObject,'String')) returns contents of d as a1 double% --- Executes during object creation, after setting all properties.function p_CreateFcn(hObject, eventdata, handles)% hObject handle to p (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction p_Callback(hObject, eventdata, handles)% hObject handle to p (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of p as text% str2double(get(hObject,'String')) returns contents of p as a1 double% --- Executes during object creation, after setting all properties.function q_CreateFcn(hObject, eventdata, handles)% hObject handle to q (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction q_Callback(hObject, eventdata, handles)% hObject handle to q (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of q as text% str2double(get(hObject,'String')) returns contents of q as a1 double% --- Executes during object creation, after setting all properties.function A1_CreateFcn(hObject, eventdata, handles)% hObject handle to A1 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction A1_Callback(hObject, eventdata, handles)% hObject handle to A1 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of A1 as text% str2double(get(hObject,'String')) returns contents of A1 as a1 double% --- Executes during object creation, after setting all properties.function B1_CreateFcn(hObject, eventdata, handles)% hObject handle to B1 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction B1_Callback(hObject, eventdata, handles)% hObject handle to B1 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of B1 as text% str2double(get(hObject,'String')) returns contents of B1 as a1 double% --- Executes during object creation, after setting all properties.function result_CreateFcn(hObject, eventdata, handles)% hObject handle to result (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction result_Callback(hObject, eventdata, handles)% hObject handle to result (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of result as text% str2double(get(hObject,'String')) returns contents of result as a1 double% --- Executes on button press in start.function start_Callback(hObject, eventdata, handles)% hObject handle to start (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)initialize_gui(hObject, handles);hold [x1,y1]=getline;[A,B,d,p,q,f]=draw(x1,y1);set(handles.d, 'String', d);set(handles.p, 'String', p);set(handles.q, 'String', q);set(handles.A1, 'String', A(1));set(handles.B1, 'String', B(1));set(handles.A2, 'String', A(2));set(handles.B2, 'String', B(2));if f==1 set(handles.result, 'String', '能够接受信号');else set(handles.result, 'String', '不能接受信号');end% --- Executes during object creation, after setting all properties.function A2_CreateFcn(hObject, eventdata, handles)% hObject handle to A2 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction A2_Callback(hObject, eventdata, handles)% hObject handle to A2 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of A2 as text% str2double(get(hObject,'String')) returns contents of A2 as a1 double% --- Executes during object creation, after setting all properties.function B2_CreateFcn(hObject, eventdata, handles)% hObject handle to B2 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a1 white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));endfunction B2_Callback(hObject, eventdata, handles)% hObject handle to B2 (see GCBO)% eventdata reserved - to be defined in a1 future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of B2 as text% str2double(get(hObject,'String')) returns contents of B2 as a1 double
% --- Creates and returns a handle to the GUI figure.
function h1 = building_mode_export_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;
end
h1 = figure(...
'Units','characters',...
'PaperUnits',get(0,'defaultfigurePaperUnits'),...
'Color',[0.956862745098039 0.956862745098039 0.956862745098039],...
'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],...
'IntegerHandle','off',...
'InvertHardcopy',get(0,'defaultfigureInvertHardcopy'),...
'MenuBar','none',...
'Name','building_mode',...
'NumberTitle','off',...
'PaperPosition',get(0,'defaultfigurePaperPosition'),...
'PaperSize',[20.98404194812 29.67743169791],...
'PaperType',get(0,'defaultfigurePaperType'),...
'Position',[30 10.6923076923077 161 36.7692307692308],...
'Renderer',get(0,'defaultfigureRenderer'),...
'RendererMode','manual',...
'Resize','off',...
'HandleVisibility','callback',...
'Tag','figure1',...
'UserData',zeros(1,0));
setappdata(h1, 'GUIDEOptions', struct(...
'active_h', 1.540011e+002, ...
'taginfo', struct(...
'figure', 2, ...
'axes', 3, ...
'frame', 3, ...
'edit', 15, ...
'text', 22, ...
'pushbutton', 3), ...
'override', 0, ...
'release', 13, ...
'resize', 'none', ...
'accessibility', 'callback', ...
'mfile', 1, ...
'callbacks', 1, ...
'singleton', 1, ...
'syscolorfig', 1, ...
'lastSavedFile', 'e:\MATLAB6p5\work\building_mode.m'));
h2 = 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',[9.8 3.23076923076923 98.4 31.3846153846154],...
'XColor',get(0,'defaultaxesXColor'),...
'YColor',get(0,'defaultaxesYColor'),...
'ZColor',get(0,'defaultaxesZColor'),...
'Tag','axes2');
h3 = get(h2,'title');
set(h3,...
'Parent',h2,...
'Color',[0 0 0],...
'HorizontalAlignment','center',...
'Position',[0.498983739837398 1.01593137254902 1.00005459937205],...
'VerticalAlignment','bottom',...
'HandleVisibility','off');
h4 = get(h2,'xlabel');
set(h4,...
'Parent',h2,...
'Color',[0 0 0],...
'HorizontalAlignment','center',...
'Position',[0.498983739837398 -0.0575980392156863 1.00005459937205],...
'VerticalAlignment','cap',...
'HandleVisibility','off');
h5 = get(h2,'ylabel');
set(h5,...
'Parent',h2,...
'Color',[0 0 0],...
'HorizontalAlignment','center',...
'Position',[-0.0579268292682927 0.496323529411765 1.00005459937205],...
'Rotation',90,...
'VerticalAlignment','bottom',...
'HandleVisibility','off');
h6 = get(h2,'zlabel');
set(h6,...
'Parent',h2,...
'Color',[0 0 0],...
'HorizontalAlignment','right',...
'Position',[-0.100609756097561 1.06495098039216 1.00005459937205],...
'HandleVisibility','off',...
'Visible','off');
h7 = uicontrol(...
'Parent',h1,...
'Units','characters',...
'ListboxTop',0,...
'Position',[109.8 18.4615384615385 48.2 16],...
'String',{ '' },...
'Style','frame',...
'Tag','frame2');
h8 = uicontrol(...
'Parent',h1,...
'Units','characters',...
'BackgroundColor',[1 1 1],...
'Callback','building_mode_export(''d_Callback'',gcbo,[],guidata(gcbo))',...
'ListboxTop',0,...
'Position',[131.4 30.6923076923077 15 1.84615384615385],...
'String','',...
'Style','edit',...
'CreateFcn','building_mode_export(''d_CreateFcn'',gcbo,[],guidata(gcbo))',...
'Tag','d');
h9 = uicontrol(...
'Parent',h1,...
'Units','characters',...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -