X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=utilities_LW%2FAnalytical_1D.m;fp=utilities_LW%2FAnalytical_1D.m;h=0db8f94e3642b5c5d06cd949ea217cc26f0d28b2;hb=d0401c49b6b7511cfdaa0534b78bd3c5b2b0637a;hp=0000000000000000000000000000000000000000;hpb=f8358f5ec65f099f3080043580ef861c3fd3ba2e;p=CreaPhase.git diff --git a/utilities_LW/Analytical_1D.m b/utilities_LW/Analytical_1D.m new file mode 100644 index 0000000..0db8f94 --- /dev/null +++ b/utilities_LW/Analytical_1D.m @@ -0,0 +1,38 @@ +## Copyright (C) 2015 Loriane Weber +## +## This program 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 3 of the License, or +## (at your option) any later version. +## +## This program 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 Octave; see the file COPYING. If not, see +## . + +## Analytical_1D + +## Author: Loriane Weber +## Created: 2015-12-04 + +%% delta : delta corresponding to the wire material +%% u : abscisse, in um +%% R : radius of the wire, in um +%% u0 : wire center +%% delta : coeff delta + +function [ Phi ] = Analytical_1D(delta, u, R, u0) + +if(isscalar(delta) && isscalar(u0) && isscalar(R)) + Phi=zeros(size(u)); + Phi=2*delta*real(sqrt(R^2-(u-u0).^2)); +else + disp('delta, radius and center position should be scalars') +end + + +endfunction