From cd41972eb98c3c69f74d6788e76e7789a846e53a Mon Sep 17 00:00:00 2001 From: Abhinav Dronamraju Date: Thu, 27 Jul 2017 18:16:59 +0530 Subject: Nan Median Added --- 2.3-1/src/c/elementaryFunctions/nanmax/dnanmax1a.c | 58 ++++++++++++++++++++++ 2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c | 57 --------------------- .../src/c/elementaryFunctions/nanmax/znanmaxcola.c | 36 -------------- .../src/c/elementaryFunctions/nanmax/znanmaxrowa.c | 37 -------------- 4 files changed, 58 insertions(+), 130 deletions(-) create mode 100644 2.3-1/src/c/elementaryFunctions/nanmax/dnanmax1a.c delete mode 100644 2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c delete mode 100644 2.3-1/src/c/elementaryFunctions/nanmax/znanmaxcola.c delete mode 100644 2.3-1/src/c/elementaryFunctions/nanmax/znanmaxrowa.c (limited to '2.3-1/src/c/elementaryFunctions/nanmax') diff --git a/2.3-1/src/c/elementaryFunctions/nanmax/dnanmax1a.c b/2.3-1/src/c/elementaryFunctions/nanmax/dnanmax1a.c new file mode 100644 index 00000000..a0e7eede --- /dev/null +++ b/2.3-1/src/c/elementaryFunctions/nanmax/dnanmax1a.c @@ -0,0 +1,58 @@ +/* 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 +#include +#include +#include "nanmax.h" +#include "types.h" +double dnanmax1a(double* in, int row, int col, double* out) +{ +double high; +int ival=0; +for(int i=0; i high) + { + high= in[i]; + ival=i; + + } + + + } + + + } + +out[0]= ival%row +1; +out[1]= ival/row +1; + + + +return high; + +} diff --git a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c b/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c deleted file mode 100644 index 6283bf16..00000000 --- a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c +++ /dev/null @@ -1,57 +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: Abhinav Dronamraju - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - -#include -#include -#include -#include "nanmax.h" -#include "types.h" -#include "doubleComplex.h" -#include "abs.h" - -doubleComplex znanmaxa(doubleComplex* in, int size) -{ -doubleComplex high=0; int k=0; -for(int i=0; i zabss(high)) - { - high= in[i]; - - } - - - } - - - } - - -if(k != 0) -return high; -else -return - 0.0/0.0; -} diff --git a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxcola.c b/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxcola.c deleted file mode 100644 index ffb96b20..00000000 --- a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxcola.c +++ /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: Abhinav Dronamraju - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "nanmax.h" -#include "types.h" -#include "uint16.h" -#include "doubleComplex.h" - -void znanmaxcola(doubleComplex *in, int row, int col, doubleComplex* out) -{ - doubleComplex inter[col]; - - -for(int i=0; i< row; i++) - { - for(int j=0 ; j< col; j++) - { - inter[j]= in[i+ (j*row)]; - - } - out[i]= znanmaxa( inter, col); - - } - - -} diff --git a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxrowa.c b/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxrowa.c deleted file mode 100644 index e035e778..00000000 --- a/2.3-1/src/c/elementaryFunctions/nanmax/znanmaxrowa.c +++ /dev/null @@ -1,37 +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: Abhinav Dronamraju - Organization: FOSSEE, IIT Bombay - Email: toolbox@scilab.in -*/ - - -#include "nanmax.h" -#include "types.h" -#include "uint16.h" -#include "doubleComplex.h" - -void znanmaxrowa(doubleComplex *in, int row, int col, doubleComplex* out) -{ - doubleComplex inter[row]; - - - -for(int i=0; i< col; i++) - { - for(int j=0 ; j< row; j++) - { - inter[j]= in[j+ (i*row)]; - - } - out[i]= znanmaxa( inter, row); - - } - - -} -- cgit