]> Creatis software - CreaPhase.git/blob - octave_packages/secs1d-0.0.8/Utilities/Ucompconst.m
Add a useful package (from Source forge) for octave
[CreaPhase.git] / octave_packages / secs1d-0.0.8 / Utilities / Ucompconst.m
1 function R = Ucompconst (nodes,Nnodes,elements,Nelements,D,C)
2   
3 % R = compconst (nodes,Nnodes,elements,Nelements,D,C);
4   
5  ## This file is part of 
6   ##
7   ## SECS1D - A 1-D Drift--Diffusion Semiconductor Device Simulator
8   ## -------------------------------------------------------------------
9   ## Copyright (C) 2004-2007  Carlo de Falco
10   ##
11   ##
12   ##
13   ##  SECS1D is free software; you can redistribute it and/or modify
14   ##  it under the terms of the GNU General Public License as published by
15   ##  the Free Software Foundation; either version 2 of the License, or
16   ##  (at your option) any later version.
17   ##
18   ##  SECS1D is distributed in the hope that it will be useful,
19   ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
20   ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21   ##  GNU General Public License for more details.
22   ##
23   ##  You should have received a copy of the GNU General Public License
24   ##  along with SECS1D; If not, see <http://www.gnu.org/licenses/>.
25   
26   h     = (nodes(2:end)-nodes(1:end-1)).*C;
27   R         = D.*[h(1)/2; (h(1:end-1)+h(2:end))/2; h(end)/2];
28   
29   
30   % Last Revision:
31   % $Author: adb014 $
32   % $Date: 2008-02-04 16:26:27 +0100 (man, 04 feb 2008) $
33