summaryrefslogtreecommitdiff
path: root/src/matrixOperations/eyes/ceyesa.c
diff options
context:
space:
mode:
authorsimon2008-08-19 17:15:04 +0000
committersimon2008-08-19 17:15:04 +0000
commit31e881dc749d8fc99028db3a09b565f392b382de (patch)
tree5016ca94f8b7971dd8ac498784f65ef4d6bbb872 /src/matrixOperations/eyes/ceyesa.c
parentb074501da9007198d67b37dd3527eeef2bb51dc8 (diff)
downloadscilab2c-31e881dc749d8fc99028db3a09b565f392b382de.tar.gz
scilab2c-31e881dc749d8fc99028db3a09b565f392b382de.tar.bz2
scilab2c-31e881dc749d8fc99028db3a09b565f392b382de.zip
added the test , and modify the way the matrix eyes is set up
Diffstat (limited to 'src/matrixOperations/eyes/ceyesa.c')
-rw-r--r--src/matrixOperations/eyes/ceyesa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/matrixOperations/eyes/ceyesa.c b/src/matrixOperations/eyes/ceyesa.c
index 4e396f29..7bac26ce 100644
--- a/src/matrixOperations/eyes/ceyesa.c
+++ b/src/matrixOperations/eyes/ceyesa.c
@@ -14,11 +14,10 @@
void ceyesa(floatComplex *in, int _iRows, int _iCols)
{
- int i , j ;
+ int i ;
- for ( i = 0 ; i < _iRows ; i++ )
- for ( j = 0 ; j <_iCols ; j++ )
- in[i + j * _iRows] = FloatComplex ( (i==j)?1.0f:0.0f , 0) ;
+ for ( i = 0 ; i < _iRows*_iCols ; i++ )
+ in[i] = FloatComplex ( (i%(_iCols+1) == 0)?1.0f:0.0f , 0) ;
}