diff options
author | Brijeshcr | 2017-07-07 19:57:00 +0530 |
---|---|---|
committer | Brijeshcr | 2017-07-07 19:57:00 +0530 |
commit | eb4fd4f84b56a9b8f1976a67461f2c918edede32 (patch) | |
tree | ad6032b0992e679f9d69e98074141267888f5c03 /src/c/signalProcessing/ell1mag | |
parent | aa250753b439916e4df235839e9266f058632f80 (diff) | |
parent | 936bd00d2855553f52d682494814804065c7b99e (diff) | |
download | scilab2c-eb4fd4f84b56a9b8f1976a67461f2c918edede32.tar.gz scilab2c-eb4fd4f84b56a9b8f1976a67461f2c918edede32.tar.bz2 scilab2c-eb4fd4f84b56a9b8f1976a67461f2c918edede32.zip |
Signal Processing and Demos Updated
Diffstat (limited to 'src/c/signalProcessing/ell1mag')
-rw-r--r-- | src/c/signalProcessing/ell1mag/dell1maga.c | 2 | ||||
-rw-r--r-- | src/c/signalProcessing/ell1mag/zell1maga.c | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/c/signalProcessing/ell1mag/dell1maga.c b/src/c/signalProcessing/ell1mag/dell1maga.c index 9af0c8e8..58ef3035 100644 --- a/src/c/signalProcessing/ell1mag/dell1maga.c +++ b/src/c/signalProcessing/ell1mag/dell1maga.c @@ -21,7 +21,7 @@ void dell1maga(double eps,double m1,double* z,int size,double* oup ) int i; for(i=0;i<size;i++) { - s[i]=zmodsns(z[i],m1); + s[i]=dmodsns(z[i],m1); } double un[size]; int j; diff --git a/src/c/signalProcessing/ell1mag/zell1maga.c b/src/c/signalProcessing/ell1mag/zell1maga.c index 6e7a6f93..35b49281 100644 --- a/src/c/signalProcessing/ell1mag/zell1maga.c +++ b/src/c/signalProcessing/ell1mag/zell1maga.c @@ -14,6 +14,9 @@ #include "modsn.h" #include "ell1mag.h" #include "doubleComplex.h" +#include "multiplication.h" +#include "addition.h" +#include "division.h" void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup ) { @@ -31,9 +34,15 @@ void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup ) } doubleComplex v; int k; + double ml; + ml=eps*eps; + doubleComplex tp1,tp2,tp3; for(k=0;k<size;k++) { - v=un[k]/(un[k]+(eps*eps*s[k]*s[k])); + tp1=zmuls(s[k],s[k]); + tp2=DoubleComplex(ml,0); + tp3=DoubleComplex(un[k],0); + v=zrdivs(tp3,zadds(tp3,(zmuls(tp2,tp1)))); oup[k]=zreals(v); } } |