1 ## Copyright (C) 2015 Loriane Weber
3 ## This program is free software; you can redistribute it and/or modify
4 ## it under the terms of the GNU General Public License as published by
5 ## the Free Software Foundation; either version 3 of the License, or
6 ## (at your option) any later version.
8 ## This program is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 ## GNU General Public License for more details.
13 ## You should have received a copy of the GNU General Public License
14 ## along with Octave; see the file COPYING. If not, see
15 ## <http://www.gnu.org/licenses/>.
19 ## Author: Loriane Weber <lweber@gpid16a-1802>
20 ## Created: 2015-12-04
22 %% delta : delta corresponding to the wire material
23 %% u : abscisse, in um
24 %% R : radius of the wire, in um
26 %% delta : coeff delta
28 function [ Phi ] = Analytical_1D(delta, u, R, u0)
30 if(isscalar(delta) && isscalar(u0) && isscalar(R))
32 Phi=2*delta*real(sqrt(R^2-(u-u0).^2));
34 disp('delta, radius and center position should be scalars')