📄 summary.m
字号:
function varargout = Summary(varargin)
% SUMMARY M-file for Summary.fig
% SUMMARY, by itself, creates a new SUMMARY or raises the existing
% singleton*.
%
% H = SUMMARY returns the handle to a new SUMMARY or the handle to
% the existing singleton*.
%
% SUMMARY('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SUMMARY.M with the given input arguments.
%
% SUMMARY('Property','Value',...) creates a new SUMMARY or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before Summary_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to Summary_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
% Copyright 2002-2003 The MathWorks, Inc.
% Edit the above text to modify the response to help Summary
% Last Modified by GUIDE v2.5 07-Oct-2005 16:06:07
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @Summary_OpeningFcn, ...
'gui_OutputFcn', @Summary_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 Summary is made visible.
function Summary_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 Summary (see VARARGIN)
% Choose default command line output for Summary
handles.output = hObject;
Parameters = varargin{1};
Values = varargin{2};
Units = varargin{3};
Title = varargin{4};
Ahandle = varargin{5};
if numel(varargin)<6
Type='';
else
Type = varargin{6};
end
cla reset
format = '%1.4g';
for k=1:numel(Parameters)
set(eval(strcat('handles.Param',num2str(k))),'String',...
Parameters{k},'Visible','on')
set(eval(strcat('handles.ParamVal',num2str(k))),'String',...
num2str(Values(k),format),'Visible','on')
% set(eval(strcat('handles.ParamVal',num2str(k))),'String',...
% strcat(num2str(Values(k)),' . ',Units{k}) )
set(eval(strcat('handles.ParamUnit',num2str(k))),'String',...
Units{k},'Visible','on')
end
k=k+1;
while k<=11
set(eval(strcat('handles.Param',num2str(k))),'Visible','off');
set(eval(strcat('handles.ParamVal',num2str(k))),'Visible','off');
set(eval(strcat('handles.ParamUnit',num2str(k))),'Visible','off');
k = k+1;
end
antenna =copyobj(get(Ahandle.antenna,'Children'),handles.axes1);
set(handles.axes1,'XLim', get(Ahandle.antenna,'XLim'));
set(handles.axes1,'YLim', get(Ahandle.antenna,'YLim'));
set(handles.axes1,'ZLim', get(Ahandle.antenna,'ZLim'));
xaxis = Strip(get(get(Ahandle.antenna, 'XLabel'),'String'));
xlabel(handles.axes1, strcat('\bf',xaxis))
yaxis = Strip(get(get(Ahandle.antenna, 'YLabel'),'String'));
ylabel(handles.axes1, strcat('\bf',yaxis));
zaxis = Strip(get(get(Ahandle.antenna, 'ZLabel'),'String'));
zlabel(handles.axes1, strcat('\bf',zaxis));
if get(Ahandle.Grid,'Value')
grid on
end
if strcmp(Type,'3d')
view(3);
axis equal
end
set(handles.TitleTXT, 'String', strcat('Design Summary of ',Title));
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes Summary wait for user response (see UIRESUME)
% uiwait(handles.figure1);
function txt = Strip(txt)
if iscell(txt)
for i=1:size(txt,1)
txt{i} = Strip(txt{i});
end
else
index = strfind(txt,'\bf');
if ~isempty(index)
txt((index(1):(index(1)+2)))=[];
if size(index,2)>1
txt((index(2)-3:(index(2)-1)))=[];
end
end
index = strfind(txt,'\rm');
if ~isempty(index) txt(index:index+2)=[]; end
index = strfind(txt,'({m})');
if ~isempty(index) txt(index:index+4)=[]; end
index = strfind(txt,'(\lambda)');
if ~isempty(index) txt(index:index+8)=[]; end
index = strfind(txt,'{');
if ~isempty(index) txt(index)=[]; end
index = strfind(txt,'}');
if ~isempty(index) txt(index)=[]; end
end
% --- Outputs from this function are returned to the command line.
function varargout = Summary_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 Print_Callback(hObject, eventdata, handles)
% hObject handle to Print (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
rect = [3,5,15,15];
set(gcf, 'inverthardcopy', 'on' );
set(gcf, 'PaperPositionMode', 'auto' );
set(gcf,'PaperOrientation', 'landscape');
set(gcf, 'PaperType' , 'A4');
printpreview(handles.figure1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -