diff options
author | Brijeshcr | 2017-07-06 15:48:47 +0530 |
---|---|---|
committer | GitHub | 2017-07-06 15:48:47 +0530 |
commit | ea958d3c401761dcc24865d9639b2fab31038db8 (patch) | |
tree | 8cea93113a46d7015d1a10638778f92275a0ca94 /src/c/linearAlgebra/svd | |
parent | cb1d99232e521c34e9f0c271a6c4176cc7b9cbe4 (diff) | |
download | Scilab2C_fossee_old-ea958d3c401761dcc24865d9639b2fab31038db8.tar.gz Scilab2C_fossee_old-ea958d3c401761dcc24865d9639b2fab31038db8.tar.bz2 Scilab2C_fossee_old-ea958d3c401761dcc24865d9639b2fab31038db8.zip |
Revert "LinearAlgebra Function Added"
Diffstat (limited to 'src/c/linearAlgebra/svd')
-rw-r--r-- | src/c/linearAlgebra/svd/.1.c.swp | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | src/c/linearAlgebra/svd/zsvda.c | 33 |
2 files changed, 12 insertions, 21 deletions
diff --git a/src/c/linearAlgebra/svd/.1.c.swp b/src/c/linearAlgebra/svd/.1.c.swp Binary files differdeleted file mode 100644 index 81d9e9c..0000000 --- a/src/c/linearAlgebra/svd/.1.c.swp +++ /dev/null diff --git a/src/c/linearAlgebra/svd/zsvda.c b/src/c/linearAlgebra/svd/zsvda.c index 12a07aa..0d36022 100644 --- a/src/c/linearAlgebra/svd/zsvda.c +++ b/src/c/linearAlgebra/svd/zsvda.c @@ -113,16 +113,7 @@ void zsvda(doubleComplex *in1,int row,int col,int in2,int nout, doubleComplex *o out3[i+j*N] = zconjs(VT[j+i*N]); out3[j+i*N] = zconjs(VT[i+j*N]); } - } - /* output from zgesvd is copied to out2 variables in required format*/ - for(j=0;j<M;j++){ - for(k=0;k<N;k++){ - if(j == k) - out2[j*(Min(M,N))+k] = DoubleComplex(S[j],0); - else - out2[j*(Min(M,N))+k] = DoubleComplex(0,0); - } - } + } //ztransposea(VT,LDVT,Min(M,N),out3); /*for(i=0;i<N;i++){ for(j=0;j<N;j++){ @@ -133,7 +124,7 @@ void zsvda(doubleComplex *in1,int row,int col,int in2,int nout, doubleComplex *o //free(U); //free(VT); } - else{ /*svd(x,'e')*/ + else{ LDA = M; LDU = M; if(M > N){ @@ -165,18 +156,18 @@ void zsvda(doubleComplex *in1,int row,int col,int in2,int nout, doubleComplex *o for(j=0;j<N;j++){ out3[j+i*N] = zconjs(VT[i+j*Min(M,N)]); } - } - /* output from zgesvd is copied to out2 variables in required format*/ - for(j=0;j<Min(M,N);j++){ - for(k=0;k<Min(M,N);k++){ - if(j == k) - out2[j*(Min(M,N))+k] = DoubleComplex(S[j],0); - else - out2[j*(Min(M,N))+k] = DoubleComplex(0,0); - } - } + } //free(U); //free(VT); } + /* output from zgesvd is copied to out2 variables in required format*/ + for(j=0;j<Min(M,N);j++){ + for(k=0;k<Min(M,N);k++){ + if(j == k) + out2[j*(Min(M,N))+k] = DoubleComplex(S[j],0); + else + out2[j*(Min(M,N))+k] = DoubleComplex(0,0); + } + } } } |