diff options
author | Franz Zotter <fzotter@users.sourceforge.net> | 2009-01-10 18:33:39 +0000 |
---|---|---|
committer | Franz Zotter <fzotter@users.sourceforge.net> | 2009-01-10 18:33:39 +0000 |
commit | bacae787abd380690126e6adf82ab0cd19f5abec (patch) | |
tree | fbc1e949fea55e3b9bf2c61b23882615d19fe343 /src/mtx_svd.c | |
parent | 8721acc0c0329ef6e63107c44e1bb61fae26f015 (diff) |
added [mtx_eig] to compute eigenvalues and eigenvectors using GSL. Something seems to be wrong with the eigenvectors: result differs from GNU octave result.
svn path=/trunk/externals/iem/iemmatrix/; revision=10502
Diffstat (limited to 'src/mtx_svd.c')
-rw-r--r-- | src/mtx_svd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mtx_svd.c b/src/mtx_svd.c index 8e784ad..c046a73 100644 --- a/src/mtx_svd.c +++ b/src/mtx_svd.c @@ -3,8 +3,9 @@ * * objects for manipulating simple matrices * mostly refering to matlab/octave matrix functions + * this functions depends on the GNU scientific library * - * Copyright (c) 2008, Franz Zotter + * Copyright (c) 2009, Franz Zotter * IEM, Graz, Austria * * For information on usage and redistribution, and for a DISCLAIMER OF ALL @@ -149,16 +150,16 @@ static void mTXSvdMatrix (MTXSvd *x, t_symbol *s, SETFLOAT((x->list_u),(float) x->rows); SETFLOAT((x->list_u+1),(float) x->columns); for (n=0;n<in_size;n++) - SETFLOAT((x->list_u+2+n), x->u->data[n]); + SETFLOAT((x->list_u+2+n), (float) x->u->data[n]); for (n=0;n<x->columns;n++) - SETFLOAT((x->list_s+n), x->s->data[n]); + SETFLOAT((x->list_s+n),(float) x->s->data[n]); SETFLOAT((x->list_v),(float) x->columns); SETFLOAT((x->list_v+1),(float) x->columns); in_size=x->columns*x->columns; for (n=0;n<in_size;n++) - SETFLOAT((x->list_v+n+2), x->v->data[n]); + SETFLOAT((x->list_v+n+2), (float) x->v->data[n]); mTXSvdBang(x); } |