diff options
author | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
commit | 06337f0dc8114c70fd0c7767083971a0d091750a (patch) | |
tree | 446481550ba88e6e0f7df2db7fdc66d2016ee2f1 /src/c/signalProcessing/ffilt | |
parent | c2e305c3b82ed944d57402dd515b3d5839a31980 (diff) | |
download | Scilab2C_fossee_old-06337f0dc8114c70fd0c7767083971a0d091750a.tar.gz Scilab2C_fossee_old-06337f0dc8114c70fd0c7767083971a0d091750a.tar.bz2 Scilab2C_fossee_old-06337f0dc8114c70fd0c7767083971a0d091750a.zip |
LinearAlgebra and MatrixOperation Update
Diffstat (limited to 'src/c/signalProcessing/ffilt')
-rw-r--r-- | src/c/signalProcessing/ffilt/ffilt.h | 27 | ||||
-rw-r--r-- | src/c/signalProcessing/ffilt/gffilts.c | 90 | ||||
-rw-r--r-- | src/c/signalProcessing/ffilt/int_ffilt.h | 18 |
3 files changed, 0 insertions, 135 deletions
diff --git a/src/c/signalProcessing/ffilt/ffilt.h b/src/c/signalProcessing/ffilt/ffilt.h deleted file mode 100644 index 9b98f34..0000000 --- a/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/src/c/signalProcessing/ffilt/gffilts.c b/src/c/signalProcessing/ffilt/gffilts.c deleted file mode 100644 index 538daf3..0000000 --- a/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/src/c/signalProcessing/ffilt/int_ffilt.h b/src/c/signalProcessing/ffilt/int_ffilt.h deleted file mode 100644 index 83f4482..0000000 --- a/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__! */ |