aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c16
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;