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

📄 nnbg.m

📁 Martin T.Hagan等著,戴葵等译,神经网络设计,机械工业出版社,一书的所有例程
💻 M
字号:
function fig = nnbg(n,r)
%NNBG Neural Network Design utility function.

% First Version, 8-31-95.

%	NNBG(N,R)
%	  N - Window name (default = figure #).
%           R - Rectangle without tf names (default = none).
%         Returns handle to new figure.
%	
%	NNBG stores the following handles:
%	  H(1) = Axis covering entire figure in pixel coordinates.
%	Where H is the user data of the demo figure.

% NEW FIG

fig = figure('visible','off');

% GET SCREEN SIZE

su = get(0,'units');
set(0,'units','points');
ss = get(0,'ScreenSize');
set(0,'units',su);
left = ss(1);
bottom = ss(2);
width = ss(3);
height = ss(4);

% CENTER FIGURE ON SCREEN

fig_x = 500;
fig_y = 400;
pos = [(width-fig_x)/2+left, (height-fig_y)/2+bottom, fig_x fig_y];

% MAKE SURE TOP LEFT CORNER IS ON SCREEN
% IF SCREEN IS TOO SMALL FOR WINDOW.

if (width < fig_x)
  pos(1) = 5;
end
if (height < fig_y)
  pos(2) = bottom+height-fig_y-40;
end

% CREATE THE FIGURE

if nargin == 0
  n = '';
end
set(fig,...
  'units','points',...
  'position',pos,...
  'resize','off', ...
  'color',nnltgray, ...
  'inverthardcopy','off', ...
  'nextplot','add',...
  'name',n,...
  'numbertitle','off');

% FIGURE AXIS

fig_axis = axes(...
  'visible','off',...
  'units','points', ...
  'position',[0 0 fig_x fig_y],...
  'xlim',[0 fig_x],'ylim',[0 fig_y],...
  'nextplot','add');

% BORDER LINE

plot([0 0 500 500 0],[0 399 399 0 0],'color',nnblack)

% SAVE HANDLES AND LOCK FIGURE

set(fig,...
  'userdata',[fig_axis],...
  'nextplot','new')

⌨️ 快捷键说明

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