2 function b=Ubernoulli(x,sg)
8 % b = B(x)=x/(exp(x)-1) if sg==1
9 % b = B(-x)=x+B(x) if sg==0
10 % also works if x is a vector
12 ## This file is part of
14 ## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
15 ## -------------------------------------------------------------------
16 ## Copyright (C) 2004-2007 Carlo de Falco
20 ## SECS1D is free software; you can redistribute it and/or modify
21 ## it under the terms of the GNU General Public License as published by
22 ## the Free Software Foundation; either version 2 of the License, or
23 ## (at your option) any later version.
25 ## SECS1D is distributed in the hope that it will be useful,
26 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
27 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ## GNU General Public License for more details.
30 ## You should have received a copy of the GNU General Public License
31 ## along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
34 [bp,bn] = Ubern(x(count));
48 % $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $