diff options
author | Brijeshcr | 2017-07-06 15:24:41 +0530 |
---|---|---|
committer | GitHub | 2017-07-06 15:24:41 +0530 |
commit | a7eeecce4c7c39ea52a2d434815c574a2c42730d (patch) | |
tree | 9968264546fd54f9eaa6ad80ee7db47e366f8601 /2.3-1/src/c/signalProcessing | |
parent | 3308ea7a973e2c1e1c8bea99ac7cc783ce8e8b06 (diff) | |
parent | 115efeb443a7e6da44f628537811b69a01553ab2 (diff) | |
download | Scilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.tar.gz Scilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.tar.bz2 Scilab2C-a7eeecce4c7c39ea52a2d434815c574a2c42730d.zip |
Merge pull request #3 from sandeepgupta007/master
LinearAlgebra Function Added
Diffstat (limited to '2.3-1/src/c/signalProcessing')
90 files changed, 0 insertions, 4192 deletions
diff --git a/2.3-1/src/c/signalProcessing/%k/dmodka.c b/2.3-1/src/c/signalProcessing/%k/dmodka.c deleted file mode 100644 index c0630ec0..00000000 --- a/2.3-1/src/c/signalProcessing/%k/dmodka.c +++ /dev/null @@ -1,97 +0,0 @@ -#include<stdio.h> -#include<math.h> -#include "modk.h" -double max_calc(double* ptr,int sz) -{ - int i=0; - double mx; - if(ptr[0]<0) - { - ptr[0]=-1*ptr[0]; - } - mx=(ptr[0]); - //printf("%lf\n",mx); - for(i=1;i<sz;i++) - { - if(ptr[i]<0) - { - ptr[i]=-1*ptr[i]; - } - if(mx<(ptr[i])) - mx=(ptr[i]); - } - return mx; -} -void dmodka(double* inp,int size,double* oup) -{ - double ones[size],PI=M_PI; - double eps=pow(2,-52); - int i; - for(i=0;i<size;i++) - { - ones[i]=1; - } - double a[size],b[size],c[size],an[size],bn[size],cn[size],kans[size]; - - int j,kk,l,m; - for(j=0;j<size;j++) - { - a[j]=1; - } - for(kk=0;kk<size;kk++) - { - b[kk]=sqrt(ones[kk]-inp[kk]); - } - for(l=0;l<size;l++) - { - c[l]=sqrt(inp[l]); - - } - int x=0; - //double maxi; - //maxi=max_calc(c,size); - //printf("%lf",maxi); - - while(max_calc(c,size)>eps) - { - int q,w,r; - for(q=0;q<size;q++) - { - an[q]=0.5*(a[q]+b[q]); - } - for(w=0;w<size;w++) - { - bn[w]=sqrt(a[w]*b[w]); - } - for(r=0;r<size;r++) - { - cn[r]=0.5*(a[r]-b[r]); - } - int x,y,z; - for(x=0;x<size;x++) - { - a[x]=an[x]; - } - for(y=0;y<size;y++) - { - b[y]=bn[y]; - } - for(z=0;z<size;z++) - { - c[z]=cn[z]; - } - } - int q,w; - for(q=0;q<size;q++) - { - oup[q]=PI*(ones[q]/(2*a[q])); - } - -} -/* -int main() -{ - double m[3]={0.1,0.2,0.3}; - dka(m,3); -} -*/ diff --git a/2.3-1/src/c/signalProcessing/%k/int_modk.h b/2.3-1/src/c/signalProcessing/%k/int_modk.h deleted file mode 100644 index ae09c50a..00000000 --- a/2.3-1/src/c/signalProcessing/%k/int_modk.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_%K_H__ -#define __INT_%K_H__ - -#define d2modkz2(inp,size,oup) dmodka(inp,size,oup) - -#endif /* !INT_%K_H__! */ diff --git a/2.3-1/src/c/signalProcessing/%k/modk.h b/2.3-1/src/c/signalProcessing/%k/modk.h deleted file mode 100644 index 6b4a7e08..00000000 --- a/2.3-1/src/c/signalProcessing/%k/modk.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __%K_H__ -#define __%K_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dmodka(double* inp,int size,doubleComplex* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __%K_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/%sn/dmodsna.c b/2.3-1/src/c/signalProcessing/%sn/dmodsna.c deleted file mode 100644 index 7e1e81c3..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/dmodsna.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "modsn.h" - -void dmodsna(double* uu,int size,double emmc,double* sn) -{ - int i; - for(i=0;i<size;i++) - { - sn[i]=dmodsns(uu[i],emmc); - } -} - diff --git a/2.3-1/src/c/signalProcessing/%sn/dmodsns.c b/2.3-1/src/c/signalProcessing/%sn/dmodsns.c deleted file mode 100644 index 06d0a6f0..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/dmodsns.c +++ /dev/null @@ -1,93 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - Reference:- Abramowitz, Milton and Stegun, Irene A - Handbook of Mathematical Functions, Dover, 1965 - Chapter 16 (Sections 16.4, 16.13 and 16.15) - Link for FORTRAN code:-http://www.aip.de/groups/soe/local/numres/bookfpdf/f6-11.pdf -*/ - -#include<stdio.h> -#include<math.h> -#define CA 0.0003 -#include "modsn.h" -double dmodsns(double uu, double emmc) -{ - double a,b,c,d,emc,u; - double em[14],en[14]; - int i,ii,l,bo; - double sn,cn,dn; - emc=1-emmc; - u=uu; - if(emc) - { - bo=(emc<0.0); - if(bo) - { - d=1.0-emc; - emc/=-1.0/d; - u*=(d=sqrt(d)); - } - a=1.0; - dn=1.0; - for(i=1;i<=13;i++) - { - l=i; - em[i]=a; - en[i]=(emc=sqrt(emc)); - c=0.5*(a+emc); - if(fabs(a-emc)<=CA*a)break; - emc*=a; - a=c; - } - u*=c; - sn=sin(u); - cn=cos(u); - if(sn) - { - a=cn/sn; - c*=a; - for(ii=l;ii>=1;ii--) - { - b=em[ii]; - a*=c; - c*=dn; - dn=(en[ii]+a)/(b+a); - a=c/b; - } - a=1.0/sqrt(c*c+1.0); - sn=(sn>=0.0?a:-a); - cn=c*(sn); - } - if(bo) - { - a=dn; - dn=cn; - cn=a; - sn/=d; - } - } - else - { - cn=1.0/cosh(u); - dn=cn; - sn=tanh(u); - } - return sn; -} -/* -int main() -{ - double u,k; - u=4; - k=0.7; - sn(u,k); -} -*/ diff --git a/2.3-1/src/c/signalProcessing/%sn/int_modsn.h b/2.3-1/src/c/signalProcessing/%sn/int_modsn.h deleted file mode 100644 index 179fb61f..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/int_modsn.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_MODSN_H__ -#define __INT_MODSN_H__ - -#define d0d0modsnd0(uu,emmc) dmodsns(uu,emmc) - -#endif /* !INT_MODSN_H__! */ diff --git a/2.3-1/src/c/signalProcessing/%sn/modsn.h b/2.3-1/src/c/signalProcessing/%sn/modsn.h deleted file mode 100644 index c5896562..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/modsn.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __MODSN_H__ -#define __MODSN_H__ -#include "types.h" - -#ifdef __cplusplus -extern "c" { -#endif - -double dmodsns(double uu, double emmc); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __MODSN_H__ */ diff --git a/2.3-1/src/c/signalProcessing/%sn/zmodsna.c b/2.3-1/src/c/signalProcessing/%sn/zmodsna.c deleted file mode 100644 index 85bc0c16..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/zmodsna.c +++ /dev/null @@ -1,165 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "modsn.h" -#include "doubleComplex.h" -#define CA 0.0003 - - -doubleComplex zmodsnsproto(doubleComplex uu,double emmc,doubleComplex* sni) -{ - doubleComplex ans; - double uur,uui; - uur=zreals(uu); - uui=zimags(uu); - double sr,cr,dr; - //Performing Elliptic Function operation for the real values - double a1,b1,c1,d1,emc1,u1; - double em1[14],en1[14]; - int i1,ii1,l1,bo1; - emc1=1-emmc; - u1=uur; - if(emc1) - { - bo1=(emc1<0.0); - if(bo1) - { - d1=1.0-emc1; - emc1/=-1.0/d1; - u1*=(d1=sqrt(d1)); - } - a1=1.0; - dr=1.0; - for(i1=1;i1<=13;i1++) - { - l1=i1; - em1[i1]=a1; - en1[i1]=(emc1=sqrt(emc1)); - c1=0.5*(a1+emc1); - if(fabs(a1-emc1)<=CA*a1)break; - emc1*=a1; - a1=c1; - } - u1*=c1; - sr=sin(u1); - cr=cos(u1); - if(sr) - { - a1=cr/sr; - c1*=a1; - for(ii1=l1;ii1>=1;ii1--) - { - b1=em1[ii1]; - a1*=c1; - c1*=dr; - dr=(en1[ii1]+a1)/(b1+a1); - a1=c1/b1; - } - a1=1.0/sqrt(c1*c1+1.0); - sr=(sr>=0.0?a1:-a1); - cr=c1*(sr); - } - if(bo1) - { - a1=dr; - dr=cr; - cr=a1; - sr/=d1; - } - } - else - { - cr=1.0/cosh(u1); - dr=cr; - sr=tanh(u1); - } - //////////////////////////////////////////////////////////////// - double si,ci,di; - //Performing Elleptic Function operation for the imaginary values - double a,b,c,d,emc,u; - double em[14],en[14]; - int i,ii,l,bo; - //double s1,c1,d1; - emc=emmc; - u=uui; - if(emc) - { - bo=(emc<0.0); - if(bo) - { - d=1.0-emc; - emc/=-1.0/d; - u*=(d=sqrt(d)); - } - a=1.0; - di=1.0; - for(i=1;i<=13;i++) - { - l=i; - em[i]=a; - en[i]=(emc=sqrt(emc)); - c=0.5*(a+emc); - if(fabs(a-emc)<=CA*a)break; - emc*=a; - a=c; - } - u*=c; - si=sin(u); - ci=cos(u); - if(si) - { - a=ci/si; - c*=a; - for(ii=l;ii>=1;ii--) - { - b=em[ii]; - a*=c; - c*=di; - di=(en[ii]+a)/(b+a); - a=c/b; - } - a=1.0/sqrt(c*c+1.0); - si=(si>=0.0?a:-a); - ci=c*(si); - } - if(bo) - { - a=di; - di=ci; - ci=a; - si/=d; - } - } - else - { - ci=1.0/cosh(u); - di=ci; - si=tanh(u); - } - ///////////////////////////////////////////////////////// - double delta; - delta=ci*ci + emmc*sr*sr*si*si; - double snir,snii; - snir=(sr*di)/delta; - snii=(cr*dr*si*ci)/delta; - *sni=DoubleComplex(snir,snii); -} - -void zmodsna(doubleComplex* uu,int size,double emmc,doubleComplex* sn) -{ - int i; - for(i=0;i<size;i++) - { - zmodsnsproto(uu[i],emmc,&sn[i]); - } -} diff --git a/2.3-1/src/c/signalProcessing/%sn/zmodsns.c b/2.3-1/src/c/signalProcessing/%sn/zmodsns.c deleted file mode 100644 index 5f35059f..00000000 --- a/2.3-1/src/c/signalProcessing/%sn/zmodsns.c +++ /dev/null @@ -1,161 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - Reference:- Abramowitz, Milton and Stegun, Irene A - Handbook of Mathematical Functions, Dover, 1965 - Chapter 16 (Sections 16.4, 16.13 and 16.15) - Link for FORTRAN code:-http://www.aip.de/groups/soe/local/numres/bookfpdf/f6-11.pdf -*/ - -#include<stdio.h> -#include<math.h> -#include "modsn.h" -#include "doubleComplex.h" -#define CA 0.0003 - -doubleComplex zmodsns(doubleComplex uu,double emmc) -{ - doubleComplex ans; - double uur,uui; - uur=zreals(uu); - uui=zimags(uu); - double sr,cr,dr; - //Performing Elliptic Function operation for the real values - double a1,b1,c1,d1,emc1,u1; - double em1[14],en1[14]; - int i1,ii1,l1,bo1; - emc1=1-emmc; - u1=uur; - if(emc1) - { - bo1=(emc1<0.0); - if(bo1) - { - d1=1.0-emc1; - emc1/=-1.0/d1; - u1*=(d1=sqrt(d1)); - } - a1=1.0; - dr=1.0; - for(i1=1;i1<=13;i1++) - { - l1=i1; - em1[i1]=a1; - en1[i1]=(emc1=sqrt(emc1)); - c1=0.5*(a1+emc1); - if(fabs(a1-emc1)<=CA*a1)break; - emc1*=a1; - a1=c1; - } - u1*=c1; - sr=sin(u1); - cr=cos(u1); - if(sr) - { - a1=cr/sr; - c1*=a1; - for(ii1=l1;ii1>=1;ii1--) - { - b1=em1[ii1]; - a1*=c1; - c1*=dr; - dr=(en1[ii1]+a1)/(b1+a1); - a1=c1/b1; - } - a1=1.0/sqrt(c1*c1+1.0); - sr=(sr>=0.0?a1:-a1); - cr=c1*(sr); - } - if(bo1) - { - a1=dr; - dr=cr; - cr=a1; - sr/=d1; - } - } - else - { - cr=1.0/cosh(u1); - dr=cr; - sr=tanh(u1); - } - //////////////////////////////////////////////////////////////// - double si,ci,di; - //Performing Elleptic Function operation for the imaginary values - double a,b,c,d,emc,u; - double em[14],en[14]; - int i,ii,l,bo; - //double s1,c1,d1; - emc=emmc; - u=uui; - if(emc) - { - bo=(emc<0.0); - if(bo) - { - d=1.0-emc; - emc/=-1.0/d; - u*=(d=sqrt(d)); - } - a=1.0; - di=1.0; - for(i=1;i<=13;i++) - { - l=i; - em[i]=a; - en[i]=(emc=sqrt(emc)); - c=0.5*(a+emc); - if(fabs(a-emc)<=CA*a)break; - emc*=a; - a=c; - } - u*=c; - si=sin(u); - ci=cos(u); - if(si) - { - a=ci/si; - c*=a; - for(ii=l;ii>=1;ii--) - { - b=em[ii]; - a*=c; - c*=di; - di=(en[ii]+a)/(b+a); - a=c/b; - } - a=1.0/sqrt(c*c+1.0); - si=(si>=0.0?a:-a); - ci=c*(si); - } - if(bo) - { - a=di; - di=ci; - ci=a; - si/=d; - } - } - else - { - ci=1.0/cosh(u); - di=ci; - si=tanh(u); - } - ///////////////////////////////////////////////////////// - double delta; - delta=ci*ci + emmc*sr*sr*si*si; - double snir,snii; - snir=(sr*di)/delta; - snii=(cr*dr*si*ci)/delta; - ans=DoubleComplex(snir,snii); - return ans; -} diff --git a/2.3-1/src/c/signalProcessing/amell/amell.h b/2.3-1/src/c/signalProcessing/amell/amell.h deleted file mode 100644 index 30bd6c82..00000000 --- a/2.3-1/src/c/signalProcessing/amell/amell.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __AMELL_H__ -#define __AMELL_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double damells(double u,double x); - -#ifdef __cplusplus -} /* extern "c" */ -#endif - -#endif /*__AMELL_H__*/ diff --git a/2.3-1/src/c/signalProcessing/amell/damella.c b/2.3-1/src/c/signalProcessing/amell/damella.c deleted file mode 100644 index 5c37e2a5..00000000 --- a/2.3-1/src/c/signalProcessing/amell/damella.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "amell.h" - -void damella(double* u,int size,double x,double* oup) -{ - int i; - for(i=0;i<size;i++) - { - oup[i]=damells(u[i],x); - } -} diff --git a/2.3-1/src/c/signalProcessing/amell/damells.c b/2.3-1/src/c/signalProcessing/amell/damells.c deleted file mode 100644 index 90c20530..00000000 --- a/2.3-1/src/c/signalProcessing/amell/damells.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> -#include<math.h> -#include "amell.h" -#define N 30 -#define DBL_EPSILON 2.2204460492503131E-16 - - -double damells(double u,double x) -{ - double a[N+1]; - double g[N+1]; - double c[N+1]; - double two_n; - double phi; - double k; - int n; - k=(long double)fabs(x); - if(k==1.0) - return 0; - if(k>1.0) - printf("Wrong type of input argument type #2"); - - a[0]=1.0; - g[0]=sqrt(1.0-k*k); - c[0]=k; - two_n=1.0; - for(n=0;n<N;n++) - { - if(fabs(a[n]-g[n])<(a[n]*DBL_EPSILON)) - { - break; - } - two_n+=two_n; - a[n+1]=0.5*(a[n]+g[n]); - g[n+1]=sqrt(a[n]*g[n]); - c[n+1]=0.5*(a[n]-g[n]); - } - phi=two_n*a[n]*u; - for(;n>0;n--) - { - phi=0.5*(phi+asin(c[n]*sin(phi)/a[n])); - } - return (double)phi; -} - diff --git a/2.3-1/src/c/signalProcessing/amell/int_amell.h b/2.3-1/src/c/signalProcessing/amell/int_amell.h deleted file mode 100644 index 5d0c86f6..00000000 --- a/2.3-1/src/c/signalProcessing/amell/int_amell.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_AMELL_H__ -#define __INT_AMELL_H__ - -#define d0d0amelld0(u,x) damells(u,x) - -#endif /* !__INT_AMELL_H__! */ diff --git a/2.3-1/src/c/signalProcessing/buttmag/buttmag.h b/2.3-1/src/c/signalProcessing/buttmag/buttmag.h deleted file mode 100644 index 47e64af8..00000000 --- a/2.3-1/src/c/signalProcessing/buttmag/buttmag.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __BUTTMAG_H__ -#define __BUTTMAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dbuttmags(double order, double omegac, int size, double* sample,double* out); - -#ifdef __cplusplus -} /* extern "C"*/ -#endif - -#endif /* __BUTTMAG_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/buttmag/dbuttmags.c b/2.3-1/src/c/signalProcessing/buttmag/dbuttmags.c deleted file mode 100644 index dc40e814..00000000 --- a/2.3-1/src/c/signalProcessing/buttmag/dbuttmags.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -#include<stdio.h> -#include<math.h> -#include "buttmag.h" -void dbuttmags(double order, double omegac,double* sample,int size,double* out) -{ - double ones[size]; - int j,k; - for(j=0;j<size;j++) - { - ones[j]=1.0; - } - //double h[size]; - for(k=0;k<size;k++) - { - double x=ones[k]/(ones[k]+pow((sample[k]/omegac),(2*order))); - out[k]=x; - //printf("%lf\n",h[k]); - } - -} - diff --git a/2.3-1/src/c/signalProcessing/buttmag/int_buttmag.h b/2.3-1/src/c/signalProcessing/buttmag/int_buttmag.h deleted file mode 100644 index 9867438e..00000000 --- a/2.3-1/src/c/signalProcessing/buttmag/int_buttmag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_BUTTMAG_H__ -#define __INT_BUTTMAG_H__ - -#define d0d0d2buttmagd2(order,omegac,size,sample,out) dbuttmags(order,omegac,size,sample,out) - -#endif /* !INT_BUTTMAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/buttmag/u8buttmags.c b/2.3-1/src/c/signalProcessing/buttmag/u8buttmags.c deleted file mode 100644 index e7b52c22..00000000 --- a/2.3-1/src/c/signalProcessing/buttmag/u8buttmags.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -#include<stdio.h> -#include<math.h> -#include "buttmag.h" -void dbuttmags(int order, int omegac,double* sample,int size,double* out) -{ - double ones[size]; - int j,k; - for(j=0;j<size;j++) - { - ones[j]=1.0; - } - //double h[size]; - for(k=0;k<size;k++) - { - double x=ones[k]/(ones[k]+pow((sample[k]/omegac),(2*order))); - out[k]=x; - //printf("%lf\n",h[k]); - } - -} - diff --git a/2.3-1/src/c/signalProcessing/cheb1mag/cheb1mag.h b/2.3-1/src/c/signalProcessing/cheb1mag/cheb1mag.h deleted file mode 100644 index 369ee4ce..00000000 --- a/2.3-1/src/c/signalProcessing/cheb1mag/cheb1mag.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __CHEB1MAG_H__ -#define __CHEB1MAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __CHEB1MAG_H__ */ diff --git a/2.3-1/src/c/signalProcessing/cheb1mag/dcheb1mags.c b/2.3-1/src/c/signalProcessing/cheb1mag/dcheb1mags.c deleted file mode 100644 index a4a459d4..00000000 --- a/2.3-1/src/c/signalProcessing/cheb1mag/dcheb1mags.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "cheb1mag.h" -void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out) -{ - double x; - int j; - double tn; - for(j=0;j<size;j++) - { - x=sample[j]/omegac; - if(x<=1) - { - tn=cos(n*acos(x)); - out[j]=1/(1+(epsilon*epsilon)*(tn*tn)); - } - else - { - tn=cosh(n*acosh(x)); - out[j]=1/(1+(epsilon*epsilon)*(tn*tn)); - } - } -} - diff --git a/2.3-1/src/c/signalProcessing/cheb1mag/int_cheb1mag.h b/2.3-1/src/c/signalProcessing/cheb1mag/int_cheb1mag.h deleted file mode 100644 index fa0ff83e..00000000 --- a/2.3-1/src/c/signalProcessing/cheb1mag/int_cheb1mag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_CHEB1MAG_H__ -#define __INT_CHEB1MAG_H__ - -#define d0d0d2cheb1magd2(n,omegac,epsilon,sample,size,out) dcheb1mags(n,omegac,epsilon,sample,size,out) - -#endif /* !__INT_CHEB1MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/cheb2mag/cheb2mag.h b/2.3-1/src/c/signalProcessing/cheb2mag/cheb2mag.h deleted file mode 100644 index 0516ca51..00000000 --- a/2.3-1/src/c/signalProcessing/cheb2mag/cheb2mag.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __CHEB2MAG_H__ -#define __CHEB2MAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __CHEB2MAG_H__ */ diff --git a/2.3-1/src/c/signalProcessing/cheb2mag/dcheb2mags.c b/2.3-1/src/c/signalProcessing/cheb2mag/dcheb2mags.c deleted file mode 100644 index 006c5917..00000000 --- a/2.3-1/src/c/signalProcessing/cheb2mag/dcheb2mags.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "cheb2mag.h" -void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup) -{ - double e; - //e=sqrt(A*A-1); - e=1/(pow(10,A/10)-1); - double x,k,cn,h,tp; - int i; - for(i=0;i<size;i++) - { - x=omegar/sample[i]; - if(x<=1) - { - tp=acos(x); - cn=cos(n*tp); - if(x==1) - { - h=1/(1+A*A-1); - } - else - { - h=1/(1+((A*A-1)/(cn*cn))); - } - - } - else - { - tp=acosh(x); - cn=cosh(n*tp); - h=e*(cn*cn)/(1+e*(cn*cn)); - - } - oup[i]=h; - } -} - diff --git a/2.3-1/src/c/signalProcessing/cheb2mag/int_cheb2mag.h b/2.3-1/src/c/signalProcessing/cheb2mag/int_cheb2mag.h deleted file mode 100644 index 05b77c2d..00000000 --- a/2.3-1/src/c/signalProcessing/cheb2mag/int_cheb2mag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_CHEB2MAG_H__ -#define __INT_CHEB2MAG_H__ - -#define d0d0d0d2cheb2magd2(n,omegar,A,sample,size,oup) dcheb2mag(n,omegar,A,sample,size,oup) - -#endif /* !__INT_CHEB2MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/ell1mag/dell1maga.c b/2.3-1/src/c/signalProcessing/ell1mag/dell1maga.c deleted file mode 100644 index 9af0c8e8..00000000 --- a/2.3-1/src/c/signalProcessing/ell1mag/dell1maga.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> -#include "modsn.h" -#include "ell1mag.h" -#include "doubleComplex.h" - -void dell1maga(double eps,double m1,double* z,int size,double* oup ) -{ - double s[size]; - int i; - for(i=0;i<size;i++) - { - s[i]=zmodsns(z[i],m1); - } - double un[size]; - int j; - for(j=0;j<size;j++) - { - un[j]=1; - } - double v; - int k; - for(k=0;k<size;k++) - { - v=un[k]/(un[k]+(eps*eps*s[k]*s[k])); - oup[k]=v; - } -} - diff --git a/2.3-1/src/c/signalProcessing/ell1mag/ell1mag.h b/2.3-1/src/c/signalProcessing/ell1mag/ell1mag.h deleted file mode 100644 index 8fffc0c6..00000000 --- a/2.3-1/src/c/signalProcessing/ell1mag/ell1mag.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ELL1MAG_H__ -#define __ELL1MAG_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dell1mags(double eps,double m1,doubleComplex* z,int size,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__ELL1MAG_H__*/ diff --git a/2.3-1/src/c/signalProcessing/ell1mag/int_ell1mag.h b/2.3-1/src/c/signalProcessing/ell1mag/int_ell1mag.h deleted file mode 100644 index 590a0abd..00000000 --- a/2.3-1/src/c/signalProcessing/ell1mag/int_ell1mag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ELL1MAG_H__ -#define __INT_ELL1MAG_H__ - -#define d0d0z2ell1magd2(eps,m1,z,size,oup) dell1mags(eps,m1,z,size,oup) - -#endif /* !__INT_ELL1MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/ell1mag/zell1maga.c b/2.3-1/src/c/signalProcessing/ell1mag/zell1maga.c deleted file mode 100644 index 6e7a6f93..00000000 --- a/2.3-1/src/c/signalProcessing/ell1mag/zell1maga.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> -#include "modsn.h" -#include "ell1mag.h" -#include "doubleComplex.h" - -void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup ) -{ - doubleComplex s[size]; - int i; - for(i=0;i<size;i++) - { - s[i]=zmodsns(z[i],m1); - } - double un[size]; - int j; - for(j=0;j<size;j++) - { - un[j]=1; - } - doubleComplex v; - int k; - for(k=0;k<size;k++) - { - v=un[k]/(un[k]+(eps*eps*s[k]*s[k])); - oup[k]=zreals(v); - } -} - diff --git a/2.3-1/src/c/signalProcessing/ffilt/ffilt.h b/2.3-1/src/c/signalProcessing/ffilt/ffilt.h deleted file mode 100644 index 9b98f34c..00000000 --- a/2.3-1/src/c/signalProcessing/ffilt/ffilt.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FFILT_H__ -#define __FFILT_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void gffilts(char* ft,double N,double fc,double fh,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __FFILT_H__ */ diff --git a/2.3-1/src/c/signalProcessing/ffilt/gffilts.c b/2.3-1/src/c/signalProcessing/ffilt/gffilts.c deleted file mode 100644 index 538daf3e..00000000 --- a/2.3-1/src/c/signalProcessing/ffilt/gffilts.c +++ /dev/null @@ -1,90 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "filt_sinc.h" -#include "ffilt.h" -void gffilts(char* ft,int size,double N,double fc,double fh,double* oup) -{ - int sz=N; - double X[sz]; - double no22=(N-1)/2; - int ino22=(int)no22; - if(ft[0]=='l') - { - dfilt_sincs(N,fc,X); - int k=0; - for(k=0;k<sz;k++) - { - oup[k]=X[k]; - } - } - else if(ft[0]=='h') - { - int k=0; - dfilt_sincs(N,fc,X); - for(k=0;k<sz;k++) - { - oup[k]=-1*X[k]; - } - int id=no22; - oup[id]=1+oup[id]; - } - else if(ft[0]=='b') - { - double wc=M_PI*(fh+fc); - fc=(fh-fc)/2; - dfilt_sincs(N,fc,X); - double Y[sz]; - double k=0; - for(k=-no22;k<=no22;k++) - { - int ind; - ind=k+no22; - Y[ind]=2*cos(wc*k); - } - int j=0; - for(j=0;j<sz;j++) - { - oup[j]=X[j]*Y[j]; - } - } - else if(ft[0]=='s') - { - double wc=M_PI*(fh+fc); - fc=(fh-fc)/2; - dfilt_sincs(N,fc,X); - double Y[sz]; - double k=0; - for(k=-no22;k<=no22;k++) - { - int ind; - ind=k+no22; - Y[ind]=2*cos(wc*k); - } - int j=0; - for(j=0;j<sz;j++) - { - oup[j]=-1*X[j]*Y[j]; - } - int id=no22; - oup[id]=1+oup[id]; - } -} -/* -int main() -{ - string s; - int n; - double fl,fh; -} -*/ diff --git a/2.3-1/src/c/signalProcessing/ffilt/int_ffilt.h b/2.3-1/src/c/signalProcessing/ffilt/int_ffilt.h deleted file mode 100644 index 83f44827..00000000 --- a/2.3-1/src/c/signalProcessing/ffilt/int_ffilt.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FFILT_H__ -#define __INT_FFILT_H__ - -#define g0d0d0d0ffiltd2(ft,N,fc,fh,oup) gffilts(ft,N,fc,fh,oup) - -#endif /* !__INT_FFILT_H__! */ diff --git a/2.3-1/src/c/signalProcessing/filt_sinc/dfilt_sincs.c b/2.3-1/src/c/signalProcessing/filt_sinc/dfilt_sincs.c deleted file mode 100644 index 1b7d1b18..00000000 --- a/2.3-1/src/c/signalProcessing/filt_sinc/dfilt_sincs.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "filt_sinc.h" -void dfilt_sincs(double N,double fc,double* oup) -{ - double no2=(N-1)/2; - int ino2=(int)no2; - double wl=fc*2*M_PI; - int sz=N; - double xn[sz]; - double i; - int l,m; - for(i=-no2;i<=no2;i++) - { - l=i+no2; - xn[l]=sin(wl*i); - } - double xd[sz]; - double j; - printf("\n"); - for(j=-no2;j<=no2;j++) - { - m=j+no2; - xd[m]=M_PI*j; - } - if(ino2==no2) - { - xn[(int)no2]=2*fc; - xd[(int)no2]=1; - } - double x[sz]; - int k; - for(k=0;k<N;k++) - { - oup[k]=xn[k]/xd[k]; - } -} - diff --git a/2.3-1/src/c/signalProcessing/filt_sinc/filt_sinc.h b/2.3-1/src/c/signalProcessing/filt_sinc/filt_sinc.h deleted file mode 100644 index 43b24151..00000000 --- a/2.3-1/src/c/signalProcessing/filt_sinc/filt_sinc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FILT_SINC_H__ -#define __FILT_SINC_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void u8filt_sincs(int N,double fc,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __FILT_SINC_H */ - diff --git a/2.3-1/src/c/signalProcessing/filt_sinc/int_filt_sinc.h b/2.3-1/src/c/signalProcessing/filt_sinc/int_filt_sinc.h deleted file mode 100644 index 5b7b07ae..00000000 --- a/2.3-1/src/c/signalProcessing/filt_sinc/int_filt_sinc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FILT_SINC_H__ -#define __INT_FILT_SINC_H__ - -#define u80d0filt_sincd2(N,fc,oup) u8filt_sincs(N,fc,oup) - -#endif /* !__INT_FILT_SINC_H__! */ diff --git a/2.3-1/src/c/signalProcessing/fsfirlin/dfsfirlina.c b/2.3-1/src/c/signalProcessing/fsfirlin/dfsfirlina.c deleted file mode 100644 index d2079f4d..00000000 --- a/2.3-1/src/c/signalProcessing/fsfirlin/dfsfirlina.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> - -#include<math.h> -#include "sincd.h" -#include "fsfirlin.h" -//#define PI 3.14159265358979 - -void dfsfirlina(double* hd,int size,double flag,double* hst) -{ - int n1=size,n; - if( n1%2==0) - { - n=2*n1; - } - else - { - n=2*n1+1; - } - double scd[8*n+1]; - //STRAT SINCD - double npt=4*n; - int sz=4*n; - double PI=M_PI; - double pas=PI/npt; - double om[sz+1]; - int i; - for(i=0;i<=sz;i++) - { - om[i]=i*pas; - } - double eps=pow(-1,(n-1)); - double s1[sz+1],s2[sz+1]; - double s[2*(sz)+1]; - double sr[2*(sz)+1]; - if(flag==1) - { - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[0]=n; - s2[0]=1; - s1[sz]=n*eps; - s2[sz]=1; - - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - - int x; - for(x=0;x<=4*n;x++) - { - scd[sz-x]=s[x]; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - scd[l]=s[l-(sz)]; - } - int m; - for(m=0;m<=8*n;m++) - { - scd[m]=scd[m]/n; - } - } - else - { - int a; - for(a=0;a<=4*n;a++) - { - om[a]=om[a]-(PI/(2*n)); - } - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[2]=n; - s2[2]=1; - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - int m; - for(m=0;m<=4*n;m++) - { - scd[m]=(eps*s[m])/n; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - scd[l]=s[l-(sz)]/n; - } - } - //END SINCD - int ii; - for(ii=4*n;ii<=6*n;ii++) - { - hst[ii-(4*n)]=hd[0]*scd[ii]; - } - - int epsi; - epsi=pow(-1,n-1); - int jj; - for(jj=1;jj<=(n1-1);jj++) - { - double tp1[2*n+1]; - double tp2[2*n+1]; - int k,l; - for(k=(-4*jj+4*n);k<=(-4*jj+6*n);k++) - { - tp1[k-(-4*jj+4*n)]=hd[jj]*scd[k]; - } - - for(l=(4*jj);l<=(4*jj+2*n);l++) - { - tp2[l-(4*jj)]=hd[jj]*(epsi*scd[l]); - } - int m; - for(m=0;m<=2*n;m++) - { - hst[m]=hst[m]+(tp1[m]+tp2[m]); - } - - } - - -} diff --git a/2.3-1/src/c/signalProcessing/fsfirlin/fsfirlin.h b/2.3-1/src/c/signalProcessing/fsfirlin/fsfirlin.h deleted file mode 100644 index 7337cbfe..00000000 --- a/2.3-1/src/c/signalProcessing/fsfirlin/fsfirlin.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FSFIRLIN_H__ -#define __FSFIRLIN_H__ -#include "types.h" -#include "sincd.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dfsfirlina(double* hd,int size,int flag,double* hst); - -#ifdef __cplusplus -} /* extern "C" */ -#endif diff --git a/2.3-1/src/c/signalProcessing/fsfirlin/int_fsfirlin.h b/2.3-1/src/c/signalProcessing/fsfirlin/int_fsfirlin.h deleted file mode 100644 index 857dae8c..00000000 --- a/2.3-1/src/c/signalProcessing/fsfirlin/int_fsfirlin.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FSFIRLIN_H__ -#define __INT_FSFIRLIN_H__ - -#define d2u80fsfirlind2(hd,size,flag,hst) dfsfirlina(hd,size[1],flag,hst) - -#endif /* !__INT_FSFIRLIN_H__! */ diff --git a/2.3-1/src/c/signalProcessing/includes/amell.h b/2.3-1/src/c/signalProcessing/includes/amell.h deleted file mode 100644 index 2336d3cb..00000000 --- a/2.3-1/src/c/signalProcessing/includes/amell.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __AMELL_H__ -#define __AMELL_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double damells(double u,double x); -void damella(double* u,int size,double x,double* oup); - -#ifdef __cplusplus -} /* extern "c" */ -#endif - -#endif /*__AMELL_H__*/ diff --git a/2.3-1/src/c/signalProcessing/includes/buttmag.h b/2.3-1/src/c/signalProcessing/includes/buttmag.h deleted file mode 100644 index ef17b7ea..00000000 --- a/2.3-1/src/c/signalProcessing/includes/buttmag.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __BUTTMAG_H__ -#define __BUTTMAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dbuttmags(double order, double omegac, double* sample, int size,double* out); -void u8buttmags(int order, int omegac, double* sample, int size,double* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __BUTTMAG_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/includes/cheb1mag.h b/2.3-1/src/c/signalProcessing/includes/cheb1mag.h deleted file mode 100644 index 369ee4ce..00000000 --- a/2.3-1/src/c/signalProcessing/includes/cheb1mag.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __CHEB1MAG_H__ -#define __CHEB1MAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dcheb1mags(double n, double omegac, double epsilon, double* sample,int size,double* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __CHEB1MAG_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/cheb2mag.h b/2.3-1/src/c/signalProcessing/includes/cheb2mag.h deleted file mode 100644 index 0516ca51..00000000 --- a/2.3-1/src/c/signalProcessing/includes/cheb2mag.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __CHEB2MAG_H__ -#define __CHEB2MAG_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dcheb2mags(double n,double omegar, double A, double* sample,int size,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __CHEB2MAG_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/dct.h b/2.3-1/src/c/signalProcessing/includes/dct.h deleted file mode 100644 index db95274b..00000000 --- a/2.3-1/src/c/signalProcessing/includes/dct.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#ifndef __DCT_H__ -#define __DCT_H__ - -#include <math.h> -#include "types.h" -#include "doubleComplex.h" -#include "addition.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void ddcta(double *in,int row,int col,int sign,double *out); - -void sdcta(float *in,int row,int col,int sign,float *out); - -void zdcta(doubleComplex *in,int row,int col,int sign,doubleComplex *out); - -//void cdcta(floatComplex *in,int row,int col,int sign,floatComplex *out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/2.3-1/src/c/signalProcessing/includes/ell1mag.h b/2.3-1/src/c/signalProcessing/includes/ell1mag.h deleted file mode 100644 index e881cca9..00000000 --- a/2.3-1/src/c/signalProcessing/includes/ell1mag.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ELL1MAG_H__ -#define __ELL1MAG_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void zell1maga(double eps,double m1,doubleComplex* z,int size,double* oup); -void dell1maga(double eps,double m1,double* z,int size,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__ELL1MAG_H__*/ diff --git a/2.3-1/src/c/signalProcessing/includes/ffilt.h b/2.3-1/src/c/signalProcessing/includes/ffilt.h deleted file mode 100644 index f38df6e6..00000000 --- a/2.3-1/src/c/signalProcessing/includes/ffilt.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FFILT_H__ -#define __FFILT_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void gffilts(char* ft,int size,double N,double fc,double fh,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __FFILT_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/filt_sinc.h b/2.3-1/src/c/signalProcessing/includes/filt_sinc.h deleted file mode 100644 index 095ca91f..00000000 --- a/2.3-1/src/c/signalProcessing/includes/filt_sinc.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FILT_SINC_H__ -#define __FILT_SINC_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dfilt_sincs(double N,double fc,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __FILT_SINC_H */ - diff --git a/2.3-1/src/c/signalProcessing/includes/fsfirlin.h b/2.3-1/src/c/signalProcessing/includes/fsfirlin.h deleted file mode 100644 index cf5fbbd0..00000000 --- a/2.3-1/src/c/signalProcessing/includes/fsfirlin.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __FSFIRLIN_H__ -#define __FSFIRLIN_H__ -#include "types.h" -#include "sincd.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dfsfirlina(double* hd,int size,double flag,double* hst); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /*__FSFIRLIN_H__*/ diff --git a/2.3-1/src/c/signalProcessing/includes/idct.h b/2.3-1/src/c/signalProcessing/includes/idct.h deleted file mode 100644 index 1e7b85b3..00000000 --- a/2.3-1/src/c/signalProcessing/includes/idct.h +++ /dev/null @@ -1,38 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#ifndef __IDCT_H__ -#define __IDCT_H__ - -#include <math.h> -#include "types.h" -#include "doubleComplex.h" -#include "addition.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void didcta(double *in,int row,int col,double *out); - -void sidcta(float *in,int row,int col,float *out); - -void zidcta(doubleComplex *in,int row,int col,doubleComplex *out); - -void cidcta(floatComplex *in,int row,int col,floatComplex *out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/2.3-1/src/c/signalProcessing/includes/modk.h b/2.3-1/src/c/signalProcessing/includes/modk.h deleted file mode 100644 index 5040eb7f..00000000 --- a/2.3-1/src/c/signalProcessing/includes/modk.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __MODK_H__ -#define __MODK_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dmodka(double* inp,int size,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __MODK_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/includes/modsn.h b/2.3-1/src/c/signalProcessing/includes/modsn.h deleted file mode 100644 index d91dd9d3..00000000 --- a/2.3-1/src/c/signalProcessing/includes/modsn.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __MODSN_H__ -#define __MODSN_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double dmodsns(double uu, double emmc); -doubleComplex zmodsns(doubleComplex uu,double emmc); -void dmodsna(double* uu,int size,double emmc,double* sn); -void zmodsna(doubleComplex* uu,int size,double emmc,doubleComplex* sn); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __MODSN_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/sincd.h b/2.3-1/src/c/signalProcessing/includes/sincd.h deleted file mode 100644 index 9b7a3607..00000000 --- a/2.3-1/src/c/signalProcessing/includes/sincd.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __SINCD_H__ -#define __SINCD_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dsincds(double n,double flg,double* oup); -void u8sincds(int n,int flg,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __SINCD_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/includes/zpbutt.h b/2.3-1/src/c/signalProcessing/includes/zpbutt.h deleted file mode 100644 index 9eb88ad4..00000000 --- a/2.3-1/src/c/signalProcessing/includes/zpbutt.h +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPBUTT_H__ -#define __ZPBUTT_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double dzpbutts(double n,double fl,doubleComplex* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __ZPBUTT_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/includes/zpch1.h b/2.3-1/src/c/signalProcessing/includes/zpch1.h deleted file mode 100644 index fbe850cc..00000000 --- a/2.3-1/src/c/signalProcessing/includes/zpch1.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPCH1_H__ -#define __ZPCH1_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double dzpch1s(double N,double e,double wc,doubleComplex* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __ZPCH1_H__ */ diff --git a/2.3-1/src/c/signalProcessing/includes/zpch2.h b/2.3-1/src/c/signalProcessing/includes/zpch2.h deleted file mode 100644 index d7c1c647..00000000 --- a/2.3-1/src/c/signalProcessing/includes/zpch2.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPCH2_H__ -#define __ZPCH2_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __ZPCH2_H__ */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_amell.h b/2.3-1/src/c/signalProcessing/interfaces/int_amell.h deleted file mode 100644 index 10719ac5..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_amell.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_AMELL_H__ -#define __INT_AMELL_H__ - -#define d0d0amelld0(u,x) damells(u,x) -#define d2d0amelld2(u,size,x,oup) damella(u,size[1],x,oup) - -#endif /* !__INT_AMELL_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_buttmag.h b/2.3-1/src/c/signalProcessing/interfaces/int_buttmag.h deleted file mode 100644 index 4a33fafe..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_buttmag.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_BUTTMAG_H__ -#define __INT_BUTTMAG_H__ - -#define d0d0d2buttmagd2(order,omegac,sample,size,out) dbuttmags(order,omegac,sample,size[1],out) -#define u80u80d2buttmagd2(order,omegac,sample,size,out) u8buttmags(order,omegac,sample,size[1],out) - -#endif /* !INT_BUTTMAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_cheb1mag.h b/2.3-1/src/c/signalProcessing/interfaces/int_cheb1mag.h deleted file mode 100644 index 764e8c79..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_cheb1mag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_CHEB1MAG_H__ -#define __INT_CHEB1MAG_H__ - -#define d0d0d0d2cheb1magd2(n,omegac,epsilon,sample,size,out) dcheb1mags(n,omegac,epsilon,sample,size[1],out) - -#endif /* !__INT_CHEB1MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_cheb2mag.h b/2.3-1/src/c/signalProcessing/interfaces/int_cheb2mag.h deleted file mode 100644 index b63db04d..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_cheb2mag.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_CHEB2MAG_H__ -#define __INT_CHEB2MAG_H__ - -#define d0d0d0d2cheb2magd2(n,omegar,A,sample,size,oup) dcheb2mags(n,omegar,A,sample,size[1],oup) - -#endif /* !__INT_CHEB2MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_dct.h b/2.3-1/src/c/signalProcessing/interfaces/int_dct.h deleted file mode 100644 index ef58b48e..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_dct.h +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - - -#ifndef __INT_DCT_H__ -#define __INT_DCT_H__ - - - -#define d2dctd2(in,size,out) ddcta(in,size[0],size[1],-1,out) - -#define d2d0dctd2(in,size,sign,out) ddcta(in,size[0],size[1],sign,out) - -#define s2dcts2(in,size,out) sdcta(in,size[0],size[1],-1,out) - -#define s2s0dcts2(in,size,sign,out) sdcta(in,size[0],size[1],sign,out) - -#define z2dctz2(in,size,out) zdcta(in,size[0],size[1],-1,out) - -#define z2d0dctz2(in,size,sign,out) zdcta(in,size[0],size[1],sign,out) - -//#define c2dctc2(in,size,out) cdcta(in,size[0],size[1],-1,out) - -//#define c2s0dctc2(in,size,sign,out) cdcta(in,size[0],size[1],sign,out) - -#endif diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_ell1mag.h b/2.3-1/src/c/signalProcessing/interfaces/int_ell1mag.h deleted file mode 100644 index c30ffef6..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_ell1mag.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ELL1MAG_H__ -#define __INT_ELL1MAG_H__ - -#define d0d0z2ell1magd2(eps,m1,z,size,oup) zell1maga(eps,m1,z,size[1],oup) -#define d0d0d2ell1magd2(eps,m1,z,size,oup) dell1maga(eps,m1,z,size[1],oup) - -#endif /* !__INT_ELL1MAG_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_ffilt.h b/2.3-1/src/c/signalProcessing/interfaces/int_ffilt.h deleted file mode 100644 index 273b98f7..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_ffilt.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FFILT_H__ -#define __INT_FFILT_H__ - -#define g2d0d0d0ffiltd2(ft,size,N,fc,fh,oup) gffilts(ft,size[1],N,fc,fh,oup) - -#endif /* !__INT_FFILT_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_filt_sinc.h b/2.3-1/src/c/signalProcessing/interfaces/int_filt_sinc.h deleted file mode 100644 index f90d0a62..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_filt_sinc.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FILT_SINC_H__ -#define __INT_FILT_SINC_H__ - -#define d0d0filt_sincd2(N,fc,oup) dfilt_sincs(N,fc,oup) - -#endif /* !__INT_FILT_SINC_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_fsfirlin.h b/2.3-1/src/c/signalProcessing/interfaces/int_fsfirlin.h deleted file mode 100644 index 3f6fb6e0..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_fsfirlin.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_FSFIRLIN_H__ -#define __INT_FSFIRLIN_H__ - -#define d2d0fsfirlind2(hd,size,flag,hst) dfsfirlina(hd,size[1],flag,hst) - -#endif /* !__INT_FSFIRLIN_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_idct.h b/2.3-1/src/c/signalProcessing/interfaces/int_idct.h deleted file mode 100644 index f705fe2d..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_idct.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - - -#ifndef __INT_IDCT_H__ -#define __INT_IDCT_H__ - - - -#define d2idctd2(in,size,out) didcta(in,size[0],size[1],out) - -#define s2idcts2(in,size,out) sidcta(in,size[0],size[1],out) - -#define z2idctz2(in,size,out) zidcta(in,size[0],size[1],out) - -#define c2idctc2(in,size,out) cidcta(in,size[0],size[1],out) - -#endif diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_modk.h b/2.3-1/src/c/signalProcessing/interfaces/int_modk.h deleted file mode 100644 index 441b9b13..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_modk.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_MODK_H__ -#define __INT_MODK_H__ - -#define d2modkd2(inp,size,oup) dmodka(inp,size[1],oup) - -#endif /* !INT_MODK_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_modsn.h b/2.3-1/src/c/signalProcessing/interfaces/int_modsn.h deleted file mode 100644 index 56c8f8cb..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_modsn.h +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_MODSN_H__ -#define __INT_MODSN_H__ - -#define d0d0modsnd0(uu,emmc) dmodsns(uu,emmc) -#define z0d0modsnz0(uu,emmc) zmodsns(uu,emmc) -#define d2d0modsnd2(uu,size,emmc,sn) dmodsna(uu,size[1],emmc,sn) -#define z2d0modsnz2(uu,size,emmc,sn) zmodsna(uu,size[1],emmc,sn) - -#endif /* !__INT_MODSN_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_sincd.h b/2.3-1/src/c/signalProcessing/interfaces/int_sincd.h deleted file mode 100644 index 73136730..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_sincd.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_SINCD_H__ -#define __INT_SINCD_H__ - -#define d0d0sincdd2(n,flg,oup) dsincds(n,flg,oup) -#define u80u80sincdd2(n,flg,oup) u8sincds(n,flg,oup) - -#endif /* !__INT_SINCD_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_zpbutt.h b/2.3-1/src/c/signalProcessing/interfaces/int_zpbutt.h deleted file mode 100644 index 775c1026..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_zpbutt.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPBUTT_H__ -#define __INT_ZPBUTT_H__ - -#define d0d0zpbuttz2d0(n,fl,out) dzpbutts(n,fl,out) - -#endif /* !INT_ZPBUTT_H__! */ - diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_zpch1.h b/2.3-1/src/c/signalProcessing/interfaces/int_zpch1.h deleted file mode 100644 index 429e7c36..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_zpch1.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPCH1_H__ -#define __INT_ZPCH1_H__ - -#define d0d0d0zpch1z2d0(N,e,wc,out) dzpch1s(N,e,wc,out) - -#endif /* !INT_ZPCH1_H__! */ diff --git a/2.3-1/src/c/signalProcessing/interfaces/int_zpch2.h b/2.3-1/src/c/signalProcessing/interfaces/int_zpch2.h deleted file mode 100644 index fcb12a7c..00000000 --- a/2.3-1/src/c/signalProcessing/interfaces/int_zpch2.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPCH2_H__ -#define __INT_ZPCH2_H__ - -#define d0d0d0zpch2z2z2d0(N,A,omegar,zeros,poles) dzpch2s(N,A,omegar,zeros,poles) - -#endif /* !INT_ZPCH2_H__! */ diff --git a/2.3-1/src/c/signalProcessing/modk/dmodka.c b/2.3-1/src/c/signalProcessing/modk/dmodka.c deleted file mode 100644 index c0630ec0..00000000 --- a/2.3-1/src/c/signalProcessing/modk/dmodka.c +++ /dev/null @@ -1,97 +0,0 @@ -#include<stdio.h> -#include<math.h> -#include "modk.h" -double max_calc(double* ptr,int sz) -{ - int i=0; - double mx; - if(ptr[0]<0) - { - ptr[0]=-1*ptr[0]; - } - mx=(ptr[0]); - //printf("%lf\n",mx); - for(i=1;i<sz;i++) - { - if(ptr[i]<0) - { - ptr[i]=-1*ptr[i]; - } - if(mx<(ptr[i])) - mx=(ptr[i]); - } - return mx; -} -void dmodka(double* inp,int size,double* oup) -{ - double ones[size],PI=M_PI; - double eps=pow(2,-52); - int i; - for(i=0;i<size;i++) - { - ones[i]=1; - } - double a[size],b[size],c[size],an[size],bn[size],cn[size],kans[size]; - - int j,kk,l,m; - for(j=0;j<size;j++) - { - a[j]=1; - } - for(kk=0;kk<size;kk++) - { - b[kk]=sqrt(ones[kk]-inp[kk]); - } - for(l=0;l<size;l++) - { - c[l]=sqrt(inp[l]); - - } - int x=0; - //double maxi; - //maxi=max_calc(c,size); - //printf("%lf",maxi); - - while(max_calc(c,size)>eps) - { - int q,w,r; - for(q=0;q<size;q++) - { - an[q]=0.5*(a[q]+b[q]); - } - for(w=0;w<size;w++) - { - bn[w]=sqrt(a[w]*b[w]); - } - for(r=0;r<size;r++) - { - cn[r]=0.5*(a[r]-b[r]); - } - int x,y,z; - for(x=0;x<size;x++) - { - a[x]=an[x]; - } - for(y=0;y<size;y++) - { - b[y]=bn[y]; - } - for(z=0;z<size;z++) - { - c[z]=cn[z]; - } - } - int q,w; - for(q=0;q<size;q++) - { - oup[q]=PI*(ones[q]/(2*a[q])); - } - -} -/* -int main() -{ - double m[3]={0.1,0.2,0.3}; - dka(m,3); -} -*/ diff --git a/2.3-1/src/c/signalProcessing/sincd/dsincds.c b/2.3-1/src/c/signalProcessing/sincd/dsincds.c deleted file mode 100644 index 1475d8de..00000000 --- a/2.3-1/src/c/signalProcessing/sincd/dsincds.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> -#include<math.h> -#include "sincd.h" -//#define PI 3.14159265358979 -void dsincds(double n,double flg,double* oup) -{ - double npt=4*n; - int sz=4*n; - double PI=M_PI; - double pas=PI/npt; - double om[sz+1]; - int i; - for(i=0;i<=sz;i++) - { - om[i]=i*pas; - } - double eps=pow(-1,(n-1)); - double s1[sz+1],s2[sz+1]; - double s[2*(sz)+1]; - double sr[2*(sz)+1]; - if(flg==1) - { - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[0]=n; - s2[0]=1; - s1[sz]=n*eps; - s2[sz]=1; - - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - - int x; - for(x=0;x<=4*n;x++) - { - oup[sz-x]=s[x]; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - oup[l]=s[l-(sz)]; - } - int m; - for(m=0;m<=8*n;m++) - { - oup[m]=oup[m]/n; - } - } - else - { - int a; - for(a=0;a<=4*n;a++) - { - om[a]=om[a]-(PI/(2*n)); - } - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[2]=n; - s2[2]=1; - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - int m; - for(m=0;m<=4*n;m++) - { - oup[m]=(eps*s[m])/n; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - oup[l]=s[l-(sz)]/n; - } - - } -} - diff --git a/2.3-1/src/c/signalProcessing/sincd/int_sincd.h b/2.3-1/src/c/signalProcessing/sincd/int_sincd.h deleted file mode 100644 index a404978b..00000000 --- a/2.3-1/src/c/signalProcessing/sincd/int_sincd.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_SINCD_H__ -#define __INT_SINCD_H__ - -#define u80sincdd2(n,flg,oup) u8sincds(n,flg,oup) - -#endif /* !__INT_SINCD_H__! */ diff --git a/2.3-1/src/c/signalProcessing/sincd/sincd.h b/2.3-1/src/c/signalProcessing/sincd/sincd.h deleted file mode 100644 index 2df85a87..00000000 --- a/2.3-1/src/c/signalProcessing/sincd/sincd.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __SINCD_H__ -#define __SINCD_H__ -#include "types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void u8sincds(int n,int flg,double* oup); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __SINCD_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/sincd/u8sincds.c b/2.3-1/src/c/signalProcessing/sincd/u8sincds.c deleted file mode 100644 index d03f48ae..00000000 --- a/2.3-1/src/c/signalProcessing/sincd/u8sincds.c +++ /dev/null @@ -1,98 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#include<stdio.h> -#include<math.h> -#include "sincd.h" -#define PI 3.14159265358979 -void u8sincds(int n,int flg,double* oup) -{ - double npt=4*n; - int sz=4*n; - double pas=PI/npt; - double om[sz+1]; - int i; - //om[0]=0; - for(i=0;i<=sz;i++) - { - om[i]=i*pas; - } - double eps=pow(-1,(n-1)); - double s1[sz+1],s2[sz+1]; - double s[2*(sz)+1]; - double sr[2*(sz)+1]; - if(flg==1) - { - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[0]=n; - s2[0]=1; - s1[sz]=n*eps; - s2[sz]=1; - - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - - int x; - for(x=0;x<=4*n;x++) - { - oup[sz-x]=s[x]; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - oup[l]=s[l-(sz)]; - } - int m; - for(m=0;m<=8*n;m++) - { - oup[m]=oup[m]/n; - } - } - else - { - int a; - for(a=0;a<=4*n;a++) - { - om[a]=om[a]-(PI/(2*n)); - } - int j,k; - for(j=0;j<=4*n;j++) - { - s1[j]=sin(n*om[j]); - s2[j]=sin(om[j]); - } - s1[2]=n; - s2[2]=1; - for(k=0;k<=4*n;k++) - { - s[k]=s1[k]/s2[k]; - } - int m; - for(m=0;m<=4*n;m++) - { - oup[m]=(eps*s[m])/n; - } - int l; - for(l=4*n+1;l<=8*n;l++) - { - oup[l]=s[l-(sz)]/n; - } - - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c deleted file mode 100644 index 7ff83645..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/dct/cdcta.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "dct.h" -#include "addition.h" -#include "types.h" -#include "floatComplex.h" -#include "multiplication.h" -/*#include "matrixMultiplication"*/ -/*#include <fftw3.h>*/ -#include <math.h> - -void cdcta(floatComplex *in,int row,int col,int sign,floatComplex *out) -{ - int i,j,k,u,v; - int n; - int x,y; - float res,ress,vv,ff; - float re,z,q,m; - floatComplex accu = FloatComplex(0, 0); - floatComplex temp,mm,aa,bb,cc; - if(sign==-1) - { - if(row==1) - { - n=col; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - vv = cos(((M_PI)*(y+1-1./2.)*(x))/n); - aa = FloatComplex(vv,0); - temp=cmuls(in[y],aa); - out[x]=cadds(out[x],temp); - } - } - if(x==0) - { - vv = 1./(sqrt(n)); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - } - else - { - float res=2./n; - res = sqrt(res); - aa = FloatComplex(res,0); - out[x]=cmuls(out[x],aa); - } - } - } - } - else - { - n=col*row; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - temp=FloatComplex(0,0); - mm=FloatComplex(0,0); - for(j=0;j<col;j++) - { - y=j*row+i; - z=(float)(((float)j+1.0/2.0)*(float)v); - q=(float)(M_PI/(float)col); - vv = cos(q*z); - aa = FloatComplex(vv,0); - mm=cmuls(in[y],aa); - temp=cadds(temp,mm); - } - z=(float)(((float)i+1.0/2.0)*(float)u); - q=(float)(M_PI/(float)row); - ff = cos(q*z); - bb = FloatComplex(ff,0); - temp=cmuls(temp,bb); - out[x]=cadds(out[x],temp); - } - if(u==0) - { - vv = 1./sqrt((float)row); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - if(v==0) - { - vv = 1./sqrt((float)col); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - } - else - { - vv = sqrt(2./col); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - } - } - else - { - vv = sqrt(2./row); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - if(v==0) - { - vv = 1./sqrt((float)col); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - } - else - { - vv = sqrt(2./col); - aa = FloatComplex(vv,0); - out[x]=cmuls(out[x],aa); - } - } - } - } - } - } - else if(sign==1) - { - n=col; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - { - q=res*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa = FloatComplex(q,0); - out[x]=cadds(out[x],cmuls(in[y],aa)); - } - else - { - q=ress*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa = FloatComplex(q,0); - out[x]=cadds(out[x],cmuls(in[y],aa)); - } - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - re=0; - mm=FloatComplex(0,0); - temp=FloatComplex(0,0); - for(j=0;j<col;j++) - { - y=row*j+i; - mm=in[j*row+i]; - z=(float)(((float)v+1.0/2.0)*(float)j); - q=(float)(M_PI/(float)col); - vv = cos(q*z); - aa = FloatComplex(vv,0); - mm=cmuls(mm,aa); - if(j==0) - { - vv = 1./sqrt((float)col); - aa = FloatComplex(vv,0); - temp=cadds(temp,cmuls(mm,aa)); - } - else - { - vv = sqrt(2./col); - aa = FloatComplex(vv,0); - temp=cadds(temp,cmuls(mm,aa)); - } - } - z=(float)(((float)u+1.0/2.0)*(float)i); - q=(float)(M_PI/(float)row); - if(i==0) - { - vv = (cos(z*q))*(1./sqrt(row)); - aa = FloatComplex(vv,0); - out[x]=cadds(out[x],cmuls(temp,aa)); - } - else - { - vv = (cos(z*q))*sqrt(2./row); - aa = FloatComplex(vv,0); - out[x]=cadds(out[x],cmuls(temp,aa)); - } - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/ddcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/ddcta.c deleted file mode 100644 index 3802c816..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/dct/ddcta.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "dct.h" -/*#include <fftw3.h>*/ -#include <math.h> - -void ddcta(double *in,int row,int col,int sign,double *out) -{ - int i,j,k,u,v; - int n; - int x,y; - double res,ress; - double re,z,q,m; - if(sign==-1) - { - if(row==1) - { - n=col; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - out[x]+=in[y]*(cos(((M_PI)*(y+1-1./2.)*(x))/n)); - } - } - if(x==0) - out[x]*=1./(sqrt(n)); - else - { - double res=2./n; - out[x]*=sqrt(res); - } - } - } - } - else - { - n=col*row; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - m=(double)in[j*row+i]; - z=(double)(((double)j+1.0/2.0)*(double)v); - q=(double)(M_PI/(double)col); - re+=m*(cos(q*z)); - } - z=(double)(((double)i+1.0/2.0)*(double)u); - q=(double)(M_PI/(double)row); - out[x]+=re*(cos(q*z)); - } - if(u==0) - { - out[x]/=sqrt((double)row); - if(v==0) - out[x]/=sqrt((double)col); - else - out[x]*=sqrt(2./col); - } - else - { - out[x]*=sqrt(2./row); - if(v==0) - out[x]/=sqrt((double)col); - else - out[x]*=sqrt(2./col); - } - } - } - - } - } - else if(sign==1) - { - n=col; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - out[x]+=res*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - else - out[x]+=ress*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - y=row*j+i; - m=(double)in[j*row+i]; - z=(double)(((double)v+1.0/2.0)*(double)j); - q=(double)(M_PI/(double)col); - m=m*(cos(q*z)); - if(j==0) - re+=m/sqrt((double)col); - else - re+=m*sqrt(2./col); - } - z=(double)(((double)u+1.0/2.0)*(double)i); - q=(double)(M_PI/(double)row); - if(i==0) - out[x]+=(re*(cos(z*q)))/sqrt((double)row); - else - out[x]+=(re*(cos(z*q))*sqrt(2./row)); - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c deleted file mode 100644 index 9f380e8b..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/dct/sdcta.c +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "dct.h" -/*#include <fftw3.h>*/ -#include <math.h> - -void sdcta(float *in,int row,int col,int sign,float *out) -{ - int i,j,k,u,v; - int n; - int x,y; - float res,ress; - float re,z,q,m; - if(sign==-1) - { - if(row==1) - { - n=col; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - out[x]+=in[y]*(cos(((M_PI)*(y+1-1./2.)*(x))/n)); - } - } - if(x==0) - out[x]*=1./(sqrt(n)); - else - { - float res=2./n; - out[x]*=sqrt(res); - } - } - } - } - else - { - n=col*row; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - m=(float)in[j*row+i]; - z=(float)(((float)j+1.0/2.0)*(float)v); - q=(float)(M_PI/(float)col); - re+=m*(cos(q*z)); - } - z=(float)(((float)i+1.0/2.0)*(float)u); - q=(float)(M_PI/(float)row); - out[x]+=re*(cos(q*z)); - } - if(u==0) - { - out[x]/=sqrt((float)row); - if(v==0) - out[x]/=sqrt((float)col); - else - out[x]*=sqrt(2./col); - } - else - { - out[x]*=sqrt(2./row); - if(v==0) - out[x]/=sqrt((float)col); - else - out[x]*=sqrt(2./col); - } - } - } - - } - } - else if(sign==1) - { - n=col; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - out[x]+=res*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - else - out[x]+=ress*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - y=row*j+i; - m=(float)in[j*row+i]; - z=(float)(((float)v+1.0/2.0)*(float)j); - q=(float)(M_PI/(float)col); - m=m*(cos(q*z)); - if(j==0) - re+=m/sqrt((float)col); - else - re+=m*sqrt(2./col); - } - z=(float)(((float)u+1.0/2.0)*(float)i); - q=(float)(M_PI/(float)row); - if(i==0) - out[x]+=(re*(cos(z*q)))/sqrt((float)row); - else - out[x]+=(re*(cos(z*q))*sqrt(2./row)); - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/dct/zdcta.c b/2.3-1/src/c/signalProcessing/transforms/dct/zdcta.c deleted file mode 100644 index 3ae2e333..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/dct/zdcta.c +++ /dev/null @@ -1,230 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "dct.h" -#include "addition.h" -#include "types.h" -#include "doubleComplex.h" -#include "multiplication.h" -/*#include "matrixMultiplication"*/ -/*#include <fftw3.h>*/ -#include <math.h> - -void zdcta(doubleComplex *in,int row,int col,int sign,doubleComplex *out) -{ - int i,j,k,u,v; - int n; - int x,y; - double res,ress,vv,ff; - double re,z,q,m; - doubleComplex accu = DoubleComplex(0, 0); - doubleComplex temp,mm,aa,bb,cc; - if(sign==-1) - { - if(row==1) - { - n=col; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - vv = cos(((M_PI)*(y+1-1./2.)*(x))/n); - aa = DoubleComplex(vv,0); - temp=zmuls(in[y],aa); - out[x]=zadds(out[x],temp); - } - } - if(x==0) - { - vv = 1./(sqrt(n)); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - } - else - { - double res=2./n; - res = sqrt(res); - aa = DoubleComplex(res,0); - out[x]=zmuls(out[x],aa); - } - } - } - } - else - { - n=col*row; - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - temp=DoubleComplex(0,0); - mm=DoubleComplex(0,0); - for(j=0;j<col;j++) - { - y=j*row+i; - z=(double )(((double )j+1.0/2.0)*(double )v); - q=(double )(M_PI/(double )col); - vv = cos(q*z); - aa = DoubleComplex(vv,0); - mm=zmuls(in[y],aa); - temp=zadds(temp,mm); - } - z=(double )(((double )i+1.0/2.0)*(double )u); - q=(double )(M_PI/(double )row); - ff = cos(q*z); - bb = DoubleComplex(ff,0); - temp=zmuls(temp,bb); - out[x]=zadds(out[x],temp); - } - if(u==0) - { - vv = 1./sqrt((double )row); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - if(v==0) - { - vv = 1./sqrt((double )col); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - } - else - { - vv = sqrt(2./col); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - } - } - else - { - vv = sqrt(2./row); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - if(v==0) - { - vv = 1./sqrt((double )col); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - } - else - { - vv = sqrt(2./col); - aa = DoubleComplex(vv,0); - out[x]=zmuls(out[x],aa); - } - } - } - } - } - } - else if(sign==1) - { - n=col; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - { - q=res*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa = DoubleComplex(q,0); - out[x]=zadds(out[x],zmuls(in[y],aa)); - } - else - { - q=ress*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa = DoubleComplex(q,0); - out[x]=zadds(out[x],zmuls(in[y],aa)); - } - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - re=0; - mm=DoubleComplex(0,0); - temp=DoubleComplex(0,0); - for(j=0;j<col;j++) - { - y=row*j+i; - mm=in[j*row+i]; - z=(double )(((double )v+1.0/2.0)*(double )j); - q=(double )(M_PI/(double )col); - vv = cos(q*z); - aa = DoubleComplex(vv,0); - mm=zmuls(mm,aa); - if(j==0) - { - vv = 1./sqrt((double )col); - aa = DoubleComplex(vv,0); - temp=zadds(temp,zmuls(mm,aa)); - } - else - { - vv = sqrt(2./col); - aa = DoubleComplex(vv,0); - temp=zadds(temp,zmuls(mm,aa)); - } - } - z=(double )(((double )u+1.0/2.0)*(double )i); - q=(double )(M_PI/(double )row); - if(i==0) - { - vv = (cos(z*q))*(1./sqrt(row)); - aa = DoubleComplex(vv,0); - out[x]=zadds(out[x],zmuls(temp,aa)); - } - else - { - vv = (cos(z*q))*sqrt(2./row); - aa = DoubleComplex(vv,0); - out[x]=zadds(out[x],zmuls(temp,aa)); - } - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/idct/cidcta.c b/2.3-1/src/c/signalProcessing/transforms/idct/cidcta.c deleted file mode 100644 index ae98ba19..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/idct/cidcta.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "idct.h" -#include "addition.h" -#include "types.h" -#include "floatComplex.h" -#include "multiplication.h" -/*#include "matrixMultiplication"*/ -/*#include <fftw3.h>*/ -#include <math.h> - -void cidcta(floatComplex *in,int row,int col,floatComplex *out) -{ - int i,j,k,u,v; - int n=col; - int x,y; - float res,ress,vv,ff; - float re,z,q,m; - floatComplex accu = FloatComplex(0, 0); - floatComplex temp,mm,aa,bb; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - { - q=res*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa=FloatComplex(q,0); - out[x]=cadds(out[x],cmuls(in[y],aa)); - } - else - { - q=ress*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa=FloatComplex(q,0); - out[x]=cadds(out[x],cmuls(in[y],aa)); - } - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=FloatComplex(0,0); - for(i=0;i<row;i++) - { - re=0; - mm=FloatComplex(0,0); - temp=FloatComplex(0,0); - for(j=0;j<col;j++) - { - y=row*j+i; - mm=in[j*row+i]; - z=(float)(((float)v+1.0/2.0)*(float)j); - q=(float)(M_PI/(float)col); - vv=cos(q*z); - aa=FloatComplex(vv,0); - mm=cmuls(mm,aa); - if(j==0) - { - vv=1./sqrt((float)col); - aa=FloatComplex(vv,0); - temp=cadds(temp,cmuls(mm,aa)); - } - else - { - vv=sqrt(2./col); - aa=FloatComplex(vv,0); - temp=cadds(temp,cmuls(mm,aa)); - } - } - z=(float)(((float)u+1.0/2.0)*(float)i); - q=(float)(M_PI/(float)row); - if(i==0) - { - vv=(cos(z*q))*(1./sqrt(row)); - aa=FloatComplex(vv,0); - out[x]=cadds(out[x],cmuls(temp,aa)); - } - else - { - vv=(cos(z*q))*sqrt(2./row); - aa=FloatComplex(vv,0); - out[x]=cadds(out[x],cmuls(temp,aa)); - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/idct/didcta.c b/2.3-1/src/c/signalProcessing/transforms/idct/didcta.c deleted file mode 100644 index 5f475160..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/idct/didcta.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "idct.h" -/*#include <fftw3.h>*/ -#include <math.h> - -void didcta(double *in,int row,int col,double *out) -{ - int i,j,k,u,v; - int n=col; - int x,y; - double res,ress; - double re,z,q,m; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - out[x]+=res*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - else - out[x]+=ress*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - y=row*j+i; - m=(double)in[j*row+i]; - z=(double)(((double)v+1.0/2.0)*(double)j); - q=(double)(M_PI/(double)col); - m=m*(cos(q*z)); - if(j==0) - re+=m/sqrt((double)col); - else - re+=m*sqrt(2./col); - } - z=(double)(((double)u+1.0/2.0)*(double)i); - q=(double)(M_PI/(double)row); - if(i==0) - out[x]+=(re*(cos(z*q)))/sqrt((double)row); - else - out[x]+=(re*(cos(z*q))*sqrt(2./row)); - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/idct/sidcta.c b/2.3-1/src/c/signalProcessing/transforms/idct/sidcta.c deleted file mode 100644 index 62f85da0..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/idct/sidcta.c +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "idct.h" -/*#include <fftw3.h>*/ -#include <math.h> - -void sidcta(float *in,int row,int col,float *out) -{ - int i,j,k,u,v; - int n=col; - int x,y; - float res,ress; - float re,z,q,m; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - out[x]+=res*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - else - out[x]+=ress*in[y]*(cos(((M_PI)*(j)*(v+1./2.))/n)); - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=0; - for(i=0;i<row;i++) - { - re=0; - for(j=0;j<col;j++) - { - y=row*j+i; - m=(float)in[j*row+i]; - z=(float)(((float)v+1.0/2.0)*(float)j); - q=(float)(M_PI/(float)col); - m=m*(cos(q*z)); - if(j==0) - re+=m/sqrt((float)col); - else - re+=m*sqrt(2./col); - } - z=(float)(((float)u+1.0/2.0)*(float)i); - q=(float)(M_PI/(float)row); - if(i==0) - out[x]+=(re*(cos(z*q)))/sqrt((float)row); - else - out[x]+=(re*(cos(z*q))*sqrt(2./row)); - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/transforms/idct/zidcta.c b/2.3-1/src/c/signalProcessing/transforms/idct/zidcta.c deleted file mode 100644 index cc01c966..00000000 --- a/2.3-1/src/c/signalProcessing/transforms/idct/zidcta.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ukasha Noor - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "idct.h" -#include "addition.h" -#include "types.h" -#include "doubleComplex.h" -#include "multiplication.h" -/*#include "matrixMultiplication"*/ -/*#include <fftw3.h>*/ -#include <math.h> - -void zidcta(doubleComplex *in,int row,int col,doubleComplex *out) -{ - int i,j,k,u,v; - int n=col; - int x,y; - double res,ress,vv,ff; - double re,z,q,m; - doubleComplex accu = DoubleComplex(0, 0); - doubleComplex temp,mm,aa,bb; - if(row==1) - { - res=1./sqrt(n); - ress=sqrt(2./n); - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - for(j=0;j<col;j++) - { - y=row*j+i; - if(y==0) - { - q=res*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa=DoubleComplex(q,0); - out[x]=zadds(out[x],zmuls(in[y],aa)); - } - else - { - q=ress*(cos(((M_PI)*(j)*(v+1./2.))/n)); - aa=DoubleComplex(q,0); - out[x]=zadds(out[x],zmuls(in[y],aa)); - } - } - } - } - - } - } - else - { - for(u=0;u<row;u++) - { - for(v=0;v<col;v++) - { - x=v*row+u; - out[x]=DoubleComplex(0,0); - for(i=0;i<row;i++) - { - re=0; - mm=DoubleComplex(0,0); - temp=DoubleComplex(0,0); - for(j=0;j<col;j++) - { - y=row*j+i; - mm=in[j*row+i]; - z=(double)(((double)v+1.0/2.0)*(double)j); - q=(double)(M_PI/(double)col); - vv=cos(q*z); - aa=DoubleComplex(vv,0); - mm=zmuls(mm,aa); - if(j==0) - { - vv=1./sqrt((double)col); - aa=DoubleComplex(vv,0); - temp=zadds(temp,zmuls(mm,aa)); - } - else - { - vv=sqrt(2./col); - aa=DoubleComplex(vv,0); - temp=zadds(temp,zmuls(mm,aa)); - } - } - z=(double)(((double)u+1.0/2.0)*(double)i); - q=(double)(M_PI/(double)row); - if(i==0) - { - vv=(cos(z*q))*(1./sqrt(row)); - aa=DoubleComplex(vv,0); - out[x]=zadds(out[x],zmuls(temp,aa)); - } - else - { - vv=(cos(z*q))*sqrt(2./row); - aa=DoubleComplex(vv,0); - out[x]=zadds(out[x],zmuls(temp,aa)); - } - } - } - } - } -} diff --git a/2.3-1/src/c/signalProcessing/zpbutt/dzpbutts.c b/2.3-1/src/c/signalProcessing/zpbutt/dzpbutts.c deleted file mode 100644 index 33f22af9..00000000 --- a/2.3-1/src/c/signalProcessing/zpbutt/dzpbutts.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ -#include<stdio.h> -#include<math.h> -#include "zpbutt.h" -#define PI 3.14159265 -double dzpbutts(double n,double fl,doubleComplex* out) -{ - double e= PI/(2.0*(n)); - int k; - double rl,cpx,gain; - for(k=1;k<=n;k++) - { - double v=2.0*(double)k+(n)-1.0; - rl=(fl)*cos(e*v); - cpx=(fl)*sin(e*v); - out[k-1]=DoubleComplex(rl,cpx); - } - gain=pow(fl,n); - -return gain; - -} - diff --git a/2.3-1/src/c/signalProcessing/zpbutt/int_zpbutt.h b/2.3-1/src/c/signalProcessing/zpbutt/int_zpbutt.h deleted file mode 100644 index 72eae8a2..00000000 --- a/2.3-1/src/c/signalProcessing/zpbutt/int_zpbutt.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPBUTT_H__ -#define __INT_ZPBUTT_H__ - -#define d0d0zpbuttzada(n,fl,out,gain) dzpbutts(n,fl,out,gain) - -#endif /* !INT_ZPBUTT_H__ */ - diff --git a/2.3-1/src/c/signalProcessing/zpbutt/zpbutt.h b/2.3-1/src/c/signalProcessing/zpbutt/zpbutt.h deleted file mode 100644 index 6883942c..00000000 --- a/2.3-1/src/c/signalProcessing/zpbutt/zpbutt.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPBUTT_H__ -#define __ZPBUTT_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dzpbutts(double* n,double* fl,doublecomplex* out,double* gain); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - diff --git a/2.3-1/src/c/signalProcessing/zpch1/dzpch1s.c b/2.3-1/src/c/signalProcessing/zpch1/dzpch1s.c deleted file mode 100644 index ab7b6332..00000000 --- a/2.3-1/src/c/signalProcessing/zpch1/dzpch1s.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "zpch1.h" -#include "multiplication.h" -#include "conj.h" -#include "abs.h" -#define PI 3.14159265 -double dzpch1s(double N,double e,double wc,doubleComplex* out) -{ - doubleComplex accumulate,tp; - double B,r,R,gain,realVal; - double temp=sqrt(1+e*e); - - B=pow((temp+1)/e,1/N); - - r=wc*((B*B-1)/(2*B)); - R=wc*((B*B+1)/(2*B)); - - int k; - double t1=1; - double t2=0; - accumulate=DoubleComplex(t1,t2); - for(k=0;k<N;k++) - { - double theta; - theta=(PI/2)+((2*k+1)*PI)/(2*N); - double xk,yk; - xk=r*cos(theta); - yk=R*sin(theta); - out[k]=DoubleComplex(xk,yk); - tp=DoubleComplex(xk,yk); - accumulate=zmuls(accumulate,tp); - } - - realVal=zreals(accumulate); - gain=dabss(realVal); - if (N==2*(int)(N/2)) - gain=gain/sqrt(1+e*e); -return gain; - -} - diff --git a/2.3-1/src/c/signalProcessing/zpch1/int_zpch1.h b/2.3-1/src/c/signalProcessing/zpch1/int_zpch1.h deleted file mode 100644 index 8933d1a2..00000000 --- a/2.3-1/src/c/signalProcessing/zpch1/int_zpch1.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPCH1_H__ -#define __INT_ZPCH1_H__ - -#define d0d0d0zpch1z2d0(N,e,wc) dzpch1s(N,e,wc) - -#endif /* !INT_ZPCH1_H__! */ diff --git a/2.3-1/src/c/signalProcessing/zpch1/zpch1.h b/2.3-1/src/c/signalProcessing/zpch1/zpch1.h deleted file mode 100644 index fbe850cc..00000000 --- a/2.3-1/src/c/signalProcessing/zpch1/zpch1.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPCH1_H__ -#define __ZPCH1_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -double dzpch1s(double N,double e,double wc,doubleComplex* out); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __ZPCH1_H__ */ diff --git a/2.3-1/src/c/signalProcessing/zpch2/dzpch2s.c b/2.3-1/src/c/signalProcessing/zpch2/dzpch2s.c deleted file mode 100644 index 22a46a64..00000000 --- a/2.3-1/src/c/signalProcessing/zpch2/dzpch2s.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Copyright (C) 2017 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ -#include<stdio.h> -#include<math.h> -#include "zpch2.h" -#include "multiplication.h" -#include "abs.h" -#include "division.h" -#define PI 3.14159265 -double dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles) -{ - int k,j; - double e,xk,realVal,gain; - doubleComplex accumulate1,accumulate2,tp1,tp2; - accumulate1=DoubleComplex(1,0); - accumulate2=DoubleComplex(1,0); - int ct=0; - for(k=1;k<=N;k++) - { - if(k!=((N+1)/2)) - { - ct++; - double num=PI*(2*k-1); - double den=2*N; - xk=cos(num/den); - double sk=omegar/xk; - zeros[k-1]=DoubleComplex(0,sk); - tp1=DoubleComplex(0,sk); - accumulate1=zmuls(accumulate1,tp1); - } - } - for(j=1;j<=N;j++) - { - double num=PI*(2*j-1); - double den=2*N; - double xk1=num/den; - double Gamma=pow((A+sqrt(A*A-1)),(1/N)); - double alpha=-((Gamma-1/Gamma)/2)*sin(xk1); - double Beta=((Gamma+1/Gamma)/2)*cos(xk1); - double normal=alpha*alpha+Beta*Beta; - poles[j-1]=DoubleComplex((omegar*alpha)/normal,(omegar*Beta)/normal); - tp2=DoubleComplex((omegar*alpha)/normal,(omegar*Beta)/normal); - accumulate2=zmuls(accumulate2,tp2); - } - double qt; - double ra2=zreals(accumulate2); - double ra1=zreals(accumulate1); - qt=dldivs(ra1,ra2); - gain=dabss(qt); - - return gain; - -} - diff --git a/2.3-1/src/c/signalProcessing/zpch2/int_zpch2.h b/2.3-1/src/c/signalProcessing/zpch2/int_zpch2.h deleted file mode 100644 index 683a7614..00000000 --- a/2.3-1/src/c/signalProcessing/zpch2/int_zpch2.h +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __INT_ZPCH2_H__ -#define __INT_ZPCH2_H__ - -#define d0d0d0zpch2z2z2(N,A,omegar,zeros,poles) dzpch2s(N,A,omegar,zeros,poles) - -#endif /* !INT_ZPCH2_H__! */ diff --git a/2.3-1/src/c/signalProcessing/zpch2/zpch2.h b/2.3-1/src/c/signalProcessing/zpch2/zpch2.h deleted file mode 100644 index 0d191d5c..00000000 --- a/2.3-1/src/c/signalProcessing/zpch2/zpch2.h +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2016 - IIT Bombay - FOSSEE - - 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 - Author: Ankit Raj - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in - */ - -#ifndef __ZPCH2_H__ -#define __ZPCH2_H__ -#include "types.h" -#include "doubleComplex.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void dzpch2s(double N, double A, double omegar,doubleComplex* zeros,doubleComplex* poles); - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __ZPCH2_H__ */ |