From fe525aa0b13baa3113ec22fe4f2d373db6e093d8 Mon Sep 17 00:00:00 2001 From: Abhinav Dronamraju Date: Tue, 22 Aug 2017 20:54:30 +0530 Subject: Faurre, kalm, Mvcorrel added --- src/c/interpolation/interpln/dinterplna.c | 29 ++++++++++++ src/c/interpolation/interpln/sinterp13a.c | 75 +++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 src/c/interpolation/interpln/dinterplna.c create mode 100644 src/c/interpolation/interpln/sinterp13a.c (limited to 'src/c/interpolation') diff --git a/src/c/interpolation/interpln/dinterplna.c b/src/c/interpolation/interpln/dinterplna.c new file mode 100644 index 00000000..76cd7f83 --- /dev/null +++ b/src/c/interpolation/interpln/dinterplna.c @@ -0,0 +1,29 @@ +/* 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: Abhinav Dronamraju + Organization: FOSSEE, IIT Bombay + Email: toolbox@scilab.in +*/ + + +#include "interpln.h" +#include "stdio.h" +#include "matrixInversion.h" +#include "matrixTranspose.h" + +void dinterplna(double* xyd, int nd, double* x, int x_row, int x_col) +{ + int md=2; + int n= x_col*x_row; + + + + +} + + diff --git a/src/c/interpolation/interpln/sinterp13a.c b/src/c/interpolation/interpln/sinterp13a.c new file mode 100644 index 00000000..b8cb0851 --- /dev/null +++ b/src/c/interpolation/interpln/sinterp13a.c @@ -0,0 +1,75 @@ +/* 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 "interp1.h" +#include + +void sinterp13a(float *x,int size1,float *fx,int size2,float *q,int size3,char *ch,int size4,float *out) +{ + int i,j,k,f; + float a,b; + if(strcmp(ch,"linear")==0) + { + for(i=0;ix[j]) + { + j++; + } + a=x[j-1]; + b=x[j]; + out[i]=fx[j-1]+(q[i]-a)*((fx[j]-fx[j-1])/(b-a)); + } + } + } + else if(strcmp(ch,"nearest")==0) + { + for(i=0;ix[j]) + { + j++; + } + out[i]=fx[j]; + } + } + } +} + + -- cgit