diff options
Diffstat (limited to 'src/auxiliaryFunctions/find/zfinda.c')
-rw-r--r-- | src/auxiliaryFunctions/find/zfinda.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/auxiliaryFunctions/find/zfinda.c b/src/auxiliaryFunctions/find/zfinda.c index 631235d1..63d7ef20 100644 --- a/src/auxiliaryFunctions/find/zfinda.c +++ b/src/auxiliaryFunctions/find/zfinda.c @@ -15,10 +15,13 @@ void zfinda(doubleComplex* z, int size, double *out, int* indiceOut) { int i = 0; *indiceOut = 0; + + /* Initialisation de out à -1 */ + for (i=0;i<size;i++) out[i]=-1; for (i = 0; i < size ; ++i) { if (zreals(z[i]) != 0 || zimags(z[i]) != 0) { - out[*indiceOut] = (double)i; + out[*indiceOut] = (double)(i+1); (*indiceOut)++; } } |