diff options
author | simon | 2008-08-19 17:15:04 +0000 |
---|---|---|
committer | simon | 2008-08-19 17:15:04 +0000 |
commit | 31e881dc749d8fc99028db3a09b565f392b382de (patch) | |
tree | 5016ca94f8b7971dd8ac498784f65ef4d6bbb872 /src/matrixOperations/eyes/ceyesa.c | |
parent | b074501da9007198d67b37dd3527eeef2bb51dc8 (diff) | |
download | scilab2c-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.c | 7 |
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) ; } |