summaryrefslogtreecommitdiff
path: root/src/type/doubleComplex.c
diff options
context:
space:
mode:
authorjofret2008-05-13 16:41:02 +0000
committerjofret2008-05-13 16:41:02 +0000
commitc264597fc3d7a0c24fa19cafd4b065da618e6b23 (patch)
treebf4aec23274f757812a0ff1b9e321b3c408c5361 /src/type/doubleComplex.c
parente9d706092d7a0a294b1dcbc62dd40f83341a2e50 (diff)
downloadscilab2c-c264597fc3d7a0c24fa19cafd4b065da618e6b23.tar.gz
scilab2c-c264597fc3d7a0c24fa19cafd4b065da618e6b23.tar.bz2
scilab2c-c264597fc3d7a0c24fa19cafd4b065da618e6b23.zip
Adding double complex matrix constructor
Diffstat (limited to 'src/type/doubleComplex.c')
-rw-r--r--src/type/doubleComplex.c35
1 files changed, 25 insertions, 10 deletions
diff --git a/src/type/doubleComplex.c b/src/type/doubleComplex.c
index 380be331..db23721b 100644
--- a/src/type/doubleComplex.c
+++ b/src/type/doubleComplex.c
@@ -1,14 +1,14 @@
/*
-** -*- C -*-
-**
-** doubleComplex.c
-** Made by Bruno JOFRET <bruno.jofret@inria.fr>
-**
-** Started on Thu Nov 30 16:27:08 2006 jofret
-** Last update Thu Aug 16 12:25:46 2007 bruno
-**
-** Copyright INRIA 2006
-*/
+ * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+ * Copyright (C) 2006-2008 - INRIA - Bruno JOFRET
+ *
+ * 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
+ *
+ */
#ifdef __STDC_VERSION__
# ifndef STDC
@@ -75,6 +75,21 @@ doubleComplex DoubleComplex(double real, double imag) {
}
/*
+** \function DoubleComplex
+** \brief construct a Double Complex Matrix.
+*/
+doubleComplex *DoubleComplexMatrix(double* real, double* imag, int size) {
+ doubleComplex *z = malloc((uint) size * sizeof(doubleComplex));
+ int i = 0;
+
+ for(i = 0; i < size; ++i)
+ {
+ z[i] = DoubleComplex(real[i], imag[i]);
+ }
+ return z;
+}
+
+/*
** \function isreal
** \brief check if complex is real .
*/