diff options
author | Abhinav Dronamraju | 2017-07-27 18:16:59 +0530 |
---|---|---|
committer | Abhinav Dronamraju | 2017-07-27 18:16:59 +0530 |
commit | cd41972eb98c3c69f74d6788e76e7789a846e53a (patch) | |
tree | 0b9901799df41b2571a24f96f733257b56b57f1c /2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c | |
parent | bcbe9d1aae596e2a3e1669d0308bfa9003365972 (diff) | |
download | Scilab2C-cd41972eb98c3c69f74d6788e76e7789a846e53a.tar.gz Scilab2C-cd41972eb98c3c69f74d6788e76e7789a846e53a.tar.bz2 Scilab2C-cd41972eb98c3c69f74d6788e76e7789a846e53a.zip |
Nan Median Added
Diffstat (limited to '2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c')
-rw-r--r-- | 2.3-1/src/c/elementaryFunctions/nanmax/znanmaxa.c | 57 |
1 files changed, 0 insertions, 57 deletions
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 <stdio.h> -#include <stdlib.h> -#include <math.h> -#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<size; i++) -{ - if( !(isnan(in[i])) ) - { - high= in[i]; - break; - k= 1; - } -} - - - - for(int i=0; i< size; i++) - { - if( !(isnan(in[i])) ) - { - if( zabss(in[i]) > zabss(high)) - { - high= in[i]; - - } - - - } - - - } - - -if(k != 0) -return high; -else -return - 0.0/0.0; -} |