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

📄 boxindex.m

📁 AQUILA is a MATLAB toolbox for the one- or twodimensional simulation of %the electronic properties
💻 M
字号:
function [ix,iy]=boxindex(x,varargin)

%BOXINDEX find nodes
%
%[ix,iy]=boxindex(x,y,box)      for 2D simulation
%ix=boxindex(x,box)             for 1D simulation
%
%x = vector of the node positions in x-direction
%y = vector of the node positions in y-direction (2D-simulation only)
%box=[xmin ymin xmax ymax] 2D-simulation
%box=[xmin xmax] 1D-simulation
%    denotes the box you want to find
%
%ix = index into the x-node vector denotes all nodes
%   with xmin <= node-position < xmax, i.e. the xmax-node is not included
%iy = same for y-nodes

%Copyright 1999 Martin Rother
%
%This file is part of AQUILA.
%
%AQUILA is free software; you can redistribute it and/or modify
%it under the terms of the GNU General Public License as published by
%the Free Software Foundation; either version 2 of the License, or
%(at your option) any later version.
%
%AQUILA is distributed in the hope that it will be useful,
%but WITHOUT ANY WARRANTY; without even the implied warranty of
%MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%GNU General Public License for more details.
%
%You should have received a copy of the GNU General Public License
%along with AQUILA; if not, write to the Free Software
%Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

global aquila_control

if nargin==2
   box=varargin{1};
   box=[box(1) 0 box(2) 0];
   iy=1;
else
   y=varargin{1};
   box=varargin{2};
   iy=intersect(find(box(2)<=y),find(box(4)>y));
   if isempty(iy)&(aquila_control.mode==1)
      iy=1;
   end
end
ix=intersect(find(box(1)<=x),find(box(3)>x));

⌨️ 快捷键说明

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