summaryrefslogtreecommitdiff
path: root/src/matrixOperations/logm/dlogma.c
diff options
context:
space:
mode:
authortorset2009-02-20 10:54:28 +0000
committertorset2009-02-20 10:54:28 +0000
commit3c1f8b710b2dde2d43038ebeb962c582ff242dae (patch)
treed988049a3a912881b104bee5dce09ffe146d8e62 /src/matrixOperations/logm/dlogma.c
parent2b81cc929dddd7aaf88fbda1f00b64e3c3b7818d (diff)
downloadscilab2c-3c1f8b710b2dde2d43038ebeb962c582ff242dae.tar.gz
scilab2c-3c1f8b710b2dde2d43038ebeb962c582ff242dae.tar.bz2
scilab2c-3c1f8b710b2dde2d43038ebeb962c582ff242dae.zip
Update logm
Diffstat (limited to 'src/matrixOperations/logm/dlogma.c')
-rw-r--r--src/matrixOperations/logm/dlogma.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/matrixOperations/logm/dlogma.c b/src/matrixOperations/logm/dlogma.c
index 2798e127..8df8ce3a 100644
--- a/src/matrixOperations/logm/dlogma.c
+++ b/src/matrixOperations/logm/dlogma.c
@@ -14,15 +14,19 @@
#include "logm.h"
-void dlogma (double* in, int rows, doubleComplex* out){
- doubleComplex *inCpx;
+void dlogma (double* in, int rows, double* out){
+ doubleComplex *inCpx,*outCpx;
int i;
inCpx=malloc((uint)(rows*rows)*sizeof(doubleComplex));
+ outCpx=malloc((uint)(rows*rows)*sizeof(doubleComplex));
for (i=0;i<rows*rows;i++) inCpx[i] = DoubleComplex(in[i],0);
- zlogma(inCpx, rows, out);
+ zlogma(inCpx, rows, outCpx);
+
+ for (i=0;i<rows*rows;i++) out[i]=zreals(outCpx[i]);
free(inCpx);
+ free(outCpx);
}