From 4be48ad6d5f0a7140e63010f583c9a17ad6b1b8b Mon Sep 17 00:00:00 2001 From: torset Date: Mon, 22 Dec 2008 09:34:55 +0000 Subject: Add Magnitude --- src/matrixOperations/magnitude/smagna.c | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/matrixOperations/magnitude/smagna.c (limited to 'src/matrixOperations/magnitude/smagna.c') diff --git a/src/matrixOperations/magnitude/smagna.c b/src/matrixOperations/magnitude/smagna.c new file mode 100644 index 00000000..df8a851a --- /dev/null +++ b/src/matrixOperations/magnitude/smagna.c @@ -0,0 +1,38 @@ + +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2008 - INRIA - Arnaud TORSET + * + * 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 + * + */ + + +#include "matrixMagnitude.h" + +float smagna(float* in, int rows, int cols){ + int i,j; + float out=0, colSum; + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + -- cgit