diff options
author | Thomas White <taw@physics.org> | 2011-02-03 12:03:43 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:13 +0100 |
commit | 7198ffd1070a0bd9bca88ae1384aef0e562482a4 (patch) | |
tree | 2546168fe0cdaed04ce56caed245509011b82c81 /src/utils.c | |
parent | 4398834ad2897c83987d8537ea305d84f6d7b64c (diff) |
Move show_matrix_eqn() to utils.c
Diffstat (limited to 'src/utils.c')
-rw-r--r-- | src/utils.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c index 5efbdece..1d023783 100644 --- a/src/utils.c +++ b/src/utils.c @@ -16,11 +16,27 @@ #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> +#include <gsl/gsl_matrix.h> +#include <gsl/gsl_vector.h> #include "utils.h" #include "image.h" +void show_matrix_eqn(gsl_matrix *M, gsl_vector *v, int r) +{ + int i, j; + + for ( i=0; i<r; i++ ) { + STATUS("[ "); + for ( j=0; j<r; j++ ) { + STATUS("%+9.3e ", gsl_matrix_get(M, i, j)); + } + STATUS("][ a%2i ] = [ %+9.3e ]\n", i, gsl_vector_get(v, i)); + } +} + + size_t notrail(char *s) { size_t i; |