diff options
author | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
---|---|---|
committer | Sandeep Gupta | 2017-07-05 12:41:25 +0530 |
commit | dd50e95a8193fb0faa846ccaa971a115ba69e71c (patch) | |
tree | 8d66abedd68dc5255ad323b95a16c9b592657f35 /2.3-1/src/c/signalProcessing/sincd | |
parent | 3308ea7a973e2c1e1c8bea99ac7cc783ce8e8b06 (diff) | |
download | Scilab2C-dd50e95a8193fb0faa846ccaa971a115ba69e71c.tar.gz Scilab2C-dd50e95a8193fb0faa846ccaa971a115ba69e71c.tar.bz2 Scilab2C-dd50e95a8193fb0faa846ccaa971a115ba69e71c.zip |
LinearAlgebra and MatrixOperation Update
Diffstat (limited to '2.3-1/src/c/signalProcessing/sincd')
-rw-r--r-- | 2.3-1/src/c/signalProcessing/sincd/dsincds.c | 99 | ||||
-rw-r--r-- | 2.3-1/src/c/signalProcessing/sincd/int_sincd.h | 18 | ||||
-rw-r--r-- | 2.3-1/src/c/signalProcessing/sincd/sincd.h | 28 | ||||
-rw-r--r-- | 2.3-1/src/c/signalProcessing/sincd/u8sincds.c | 98 |
4 files changed, 0 insertions, 243 deletions
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; - } - - } -} |