diff options
author | simon | 2008-07-22 09:59:12 +0000 |
---|---|---|
committer | simon | 2008-07-22 09:59:12 +0000 |
commit | a957d9dca9cd35129023bedf1f2de260c7d1a867 (patch) | |
tree | 2babbb8cd55d6e6bb33939260c06c35a64a268ff /src/matrixOperations/trace/ztracea.c | |
parent | e340a75afc0ca2f3e04baffde4f2d095117c1321 (diff) | |
download | scilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.tar.gz scilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.tar.bz2 scilab2c-a957d9dca9cd35129023bedf1f2de260c7d1a867.zip |
added the trace functions, modifying matrixDivision Functions but still no change, these which worked are still working and those which failed are still failing
Diffstat (limited to 'src/matrixOperations/trace/ztracea.c')
-rw-r--r-- | src/matrixOperations/trace/ztracea.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/matrixOperations/trace/ztracea.c b/src/matrixOperations/trace/ztracea.c new file mode 100644 index 00000000..57f136ca --- /dev/null +++ b/src/matrixOperations/trace/ztracea.c @@ -0,0 +1,31 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008-2008 - INRIA - Allan SIMON + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#include "matrixTrace.h" + +void ztracea ( doubleComplex* in ,int lines, doubleComplex* out ){ + + + int i = 0 ; + double rout = 0 ; + double iout = 0 ; + + for ( i = 0 ; i < lines ; ++i) + { + rout += zreals (in[i*lines + i] ) ; + iout += zimags (in[i*lines + i] ) ; + } + + *out = DoubleComplex ( rout , iout ) ; +} + + |