summaryrefslogtreecommitdiff
path: root/src/matrixOperations/transpose/ctransposea.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/matrixOperations/transpose/ctransposea.c')
-rw-r--r--src/matrixOperations/transpose/ctransposea.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/matrixOperations/transpose/ctransposea.c b/src/matrixOperations/transpose/ctransposea.c
index ed4c34bc..571d3b78 100644
--- a/src/matrixOperations/transpose/ctransposea.c
+++ b/src/matrixOperations/transpose/ctransposea.c
@@ -12,17 +12,16 @@
#include "matrixTranspose.h"
-void ctransposea ( floatComplex* in , int lines1 , int column1, floatComplex* out ){
-
+void ctransposea ( floatComplex* in , int lines , int columns, floatComplex* out ){
- int newCoord = 0 ;
- int index = 0 ;
+ int i = 0 ;
+ int j = 0 ;
- for(index = 0 ; index < lines1 * column1 ; index++)
+ for(i = 0 ; i < lines ; i++)
{
- newCoord = index % column1 * lines1 + ( index / column1);
+ for(j = 0 ; j < columns ; j++)
- out[newCoord] = FloatComplex ( creals( in[index]) , cimags ( in[index]));
+ out[j+i*columns] = in[i+j*lines];
}
-
+
}