From 7382a75d68141d72562f219a839543c9c6fc83aa Mon Sep 17 00:00:00 2001 From: imushir Date: Tue, 29 Dec 2015 12:21:00 +0530 Subject: added support for magnitude --- src/c/matrixOperations/magnitude/i16magna.c | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/c/matrixOperations/magnitude/i16magna.c (limited to 'src/c/matrixOperations/magnitude/i16magna.c') diff --git a/src/c/matrixOperations/magnitude/i16magna.c b/src/c/matrixOperations/magnitude/i16magna.c new file mode 100644 index 00000000..884a278e --- /dev/null +++ b/src/c/matrixOperations/magnitude/i16magna.c @@ -0,0 +1,33 @@ +/* SCilab2C FOSSEE IIT BOMBAY */ + + + +#include "matrixMagnitude.h" + +int16 i16magna(int16* in, int rows, int cols){ + int i=0,j=0; + int16 out=0, colSum=0; + + /* Other method : + drowsuma(in,rows,cols,temp); + out=max(temp,cols); + but we have to malloc a array */ + + if ((rows==1)||(cols==1)){ + for(i=0;iout) out=colSum; + } + } + return out; +} + + -- cgit