⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 createfigure2_12.m

📁 matlab programming for engineers(2nd)书籍源码,这是一本很好的学习MATLAB编程书
💻 M
字号:
function createfigure(x1, y1)
%CREATEFIGURE(X1,Y1)
%  X1:  vector of x data
%  Y1:  vector of y data
 
%  Auto-generated by MATLAB on 10-Mar-2009 20:21:11
 
%% Create figure
figure1 = figure(...
  'Color',[1 1 1],...
  'PaperPosition',[0.6345 6.345 20.3 15.23],...
  'PaperSize',[20.98 29.68]);
 
%% Create axes
axes1 = axes('OuterPosition',[0 0.4985 0.4823 0.5015],'Parent',figure1);
title(axes1,'Linear Plot');
xlabel(axes1,'x');
ylabel(axes1,'y');
grid(axes1,'on');
hold(axes1,'all');
 
%% Create plot
plot1 = plot(...
  x1,y1,...
  'Color',[0.749 0.749 0],...
  'LineWidth',4,...
  'Parent',axes1);
 
%% Create axes
axes2 = axes(...
  'OuterPosition',[0.4823 0.4985 0.5177 0.5015],...
  'XMinorGrid','on',...
  'Parent',figure1);
title(axes2,'Semilog x Plot');
xlabel(axes2,'x');
ylabel(axes2,'y');
grid(axes2,'on');
 
%% Create semilogx
semilogx1 = semilogx(...
  x1,y1,...
  'LineWidth',4,...
  'Parent',axes2);
 
%% Create axes
axes3 = axes(...
  'OuterPosition',[0 0 0.4823 0.4985],...
  'YMinorGrid','on',...
  'Parent',figure1);
title(axes3,'Semilog y Plot');
xlabel(axes3,'x');
ylabel(axes3,'y');
grid(axes3,'on');
 
%% Create semilogy
semilogy1 = semilogy(...
  x1,y1,...
  'LineWidth',4,...
  'Parent',axes3);
 
%% Create axes
axes4 = axes(...
  'OuterPosition',[0.4823 0 0.5177 0.4985],...
  'XMinorGrid','on',...
  'YMinorGrid','on',...
  'Parent',figure1);
title(axes4,'Loglog Plot');
xlabel(axes4,'x');
ylabel(axes4,'y');
grid(axes4,'on');
 
%% Create loglog
loglog1 = loglog(...
  x1,y1,...
  'Color',[0.749 0 0.749],...
  'LineWidth',4,...
  'Parent',axes4);
 

⌨️ 快捷键说明

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