Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
ScatterPotential.m
Go to the documentation of this file.
2 % Copyright (C) 2016 Peter Rakyta, Ph.D.
3 %
4 % This program is free software: you can redistribute it and/or modify
5 % it under the terms of the GNU General Public License as published by
6 % the Free Software Foundation, either version 3 of the License, or
7 % (at your option) any later version.
8 %
9 % This program is distributed in the hope that it will be useful,
10 % but WITHOUT ANY WARRANTY; without even the implied warranty of
11 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 % GNU General Public License for more details.
13 %
14 % You should have received a copy of the GNU General Public License
15 % along with this program. If not, see http://www.gnu.org/licenses/.
16 %
17 %> @file ScatterPotential.m
18 %> @brief Function for island shaped hard-wall potential profile. Example taken from Eur. Phys. J. B 53, 537-549 (2006).
19 %
20 %> @brief Function for island shaped hard-wall potential profile. Example taken from Eur. Phys. J. B 53, 537-549 (2006).
21 %> @param coordinates An instance of structure #coordinates.
22 %> @param island An instance of structure #circle.
23 %> @return An N x 1 array of the on-site potential, where N is the number of sites in input coordinates.
24  function ret = ScatterPotential( coordinates, island )
25 
26  island_center = [ island.center.x, island.center.y ];
27  island_radius = island.radius;
28 
29  x = coordinates.x;
30  y = coordinates.y;
31 
32  indexes = ( (x - island_center(1)).^2 + ( y - island_center(2)).^2 ) <= island_radius^2;
33 
34  ret = zeros( size(x) );
35  ret(indexes) = 1;
36  end
Structure circle contains data describing a circle shaped area positioned in a two-dimensional space.
Definition: structures.m:34
function ScatterPotential(coordinates, island)
Function for island shaped hard-wall potential profile.
Structure param contains data structures describing the physical parameters of the scattering center ...
Definition: structures.m:45
Structure sites contains data to identify the individual sites in a matrix.
Definition: structures.m:187