From efd4b2645e3fd3c3cdd7b65501a0e7ae26d03c59 Mon Sep 17 00:00:00 2001 From: Ankit Raj Date: Wed, 21 Jun 2017 11:00:07 +0530 Subject: Functions added - string related and signal processing --- src/c/signalProcessing/cheb2mag/cheb2mag.h | 27 ++++++++++++++ src/c/signalProcessing/cheb2mag/dcheb2mags.c | 49 ++++++++++++++++++++++++++ src/c/signalProcessing/cheb2mag/int_cheb2mag.h | 18 ++++++++++ 3 files changed, 94 insertions(+) create mode 100644 src/c/signalProcessing/cheb2mag/cheb2mag.h create mode 100644 src/c/signalProcessing/cheb2mag/dcheb2mags.c create mode 100644 src/c/signalProcessing/cheb2mag/int_cheb2mag.h (limited to 'src/c/signalProcessing/cheb2mag') diff --git a/src/c/signalProcessing/cheb2mag/cheb2mag.h b/src/c/signalProcessing/cheb2mag/cheb2mag.h new file mode 100644 index 0000000..0516ca5 --- /dev/null +++ b/src/c/signalProcessing/cheb2mag/cheb2mag.h @@ -0,0 +1,27 @@ +/* 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/src/c/signalProcessing/cheb2mag/dcheb2mags.c b/src/c/signalProcessing/cheb2mag/dcheb2mags.c new file mode 100644 index 0000000..006c591 --- /dev/null +++ b/src/c/signalProcessing/cheb2mag/dcheb2mags.c @@ -0,0 +1,49 @@ +/* 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 +#include +#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