createfigure.m

来自「这是一个较为完整的tr方式uwb接收机的M文件」· M 代码 · 共 71 行

M
71
字号
function createfigure(ymatrix1)
%CREATEFIGURE(YMATRIX1)
%  YMATRIX1:  matrix of y data
 
%  Auto-generated by MATLAB on 18-Jun-2007 16:41:05
 
% Create figure
figure1 = figure(...
  'FileName','d:\Program Files\MATLAB\R2006a\work\gzw\system\TR误码率比较.fig',...
  'PaperPosition',[0.6345 6.345 20.3 15.23],...
  'PaperSize',[20.98 29.68]);
 
% Create axes
axes1 = axes(...
  'XGrid','on',...
  'XTick',[1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16],...
  'XTickLabel',{'1','1.2','1.4','1.6','1.8','2','2.2','2.4','2.6','2.8','3.0','3.2','3.4','3.6','3.8','4'},...
  'YGrid','on',...
  'YMinorGrid','on',...
  'Parent',figure1);
xlim([1 16]);
box('on');
 
% Create multiple lines using matrix input to semilogy
semilogy1 = semilogy(ymatrix1);
set(semilogy1(1),...
  'Color',[1 0 0],...
  'LineWidth',2,...
  'Marker','.');
set(semilogy1(2),...
  'Color',[0 0.498 0],...
  'LineWidth',2,...
  'Marker','.');
set(semilogy1(3),...
  'Color',[0 0 1],...
  'LineWidth',2,...
  'Marker','.');
set(semilogy1(8),...
  'Color',[0 0.749 0.749],...
  'LineWidth',2,...
  'Marker','.');
 
% Create xlabel
xlabel('积分时间[纳秒]');
 
% Create ylabel
ylabel('误码率');
 
% Create legend
legend1 = legend(axes1,{'snr=0dB','sur=2dB','snr=4dB','snr=6dB','snr=0dB','snr=2dB','snr=4dB','snr=6dB'},'Position',[0.7386 0.602 0.1045 0.2319]);
 
% Create ellipse
annotation1 = annotation(figure1,...
  'ellipse',[0.2588 0.1793 0.02148 0.6345],...
  'LineWidth',2);
 
% Create arrow
annotation2 = annotation(...
  figure1,'arrow',...
  [0.3623 0.2803],[0.4805 0.4391],...
  'LineWidth',2);
 
% Create textbox
annotation3 = annotation(...
  figure1,'textbox',...
  'Position',[0.3662 0.446 0.05469 0.05977],...
  'BackgroundColor',[1 1 1],...
  'FitHeightToText','off',...
  'String',{'理论值'});
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?