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/seyesa.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/seyesa.c')
-rw-r--r-- | src/matrixOperations/eyes/seyesa.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/matrixOperations/eyes/seyesa.c b/src/matrixOperations/eyes/seyesa.c index 40be50b9..8ed9de64 100644 --- a/src/matrixOperations/eyes/seyesa.c +++ b/src/matrixOperations/eyes/seyesa.c @@ -14,10 +14,9 @@ void seyesa(float* 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] = (i==j)?1.0f:0 ; + for ( i = 0 ; i < _iRows*_iCols ; i++ ) + in[i] = (i%(_iCols+1) == 0)?1.0f:0.0f ; } |