aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2013-08-08 11:50:20 +0200
committerThomas White <taw@physics.org>2013-08-08 11:50:20 +0200
commit59e3078dd26cec7a8d604c70e69f5caa5331ed03 (patch)
tree1cf6099d6b183b203d6f7eaca3751c3c089476e7 /libcrystfel/src/utils.c
parent5414ff57a37bc7b079a50b1c032d34e2341452f9 (diff)
Add show_matrix()
Diffstat (limited to 'libcrystfel/src/utils.c')
-rw-r--r--libcrystfel/src/utils.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/libcrystfel/src/utils.c b/libcrystfel/src/utils.c
index 7f8882a2..697c773f 100644
--- a/libcrystfel/src/utils.c
+++ b/libcrystfel/src/utils.c
@@ -77,6 +77,26 @@ void show_matrix_eqn(gsl_matrix *M, gsl_vector *v, int r)
}
+/**
+ * show_matrix:
+ * @M: A matrix
+ *
+ * Displays a matrix.
+ **/
+void show_matrix(gsl_matrix *M)
+{
+ int i, j;
+
+ for ( i=0; i<M->size1; i++ ) {
+ STATUS("[ ");
+ for ( j=0; j<M->size2; j++ ) {
+ STATUS("%+9.3e ", gsl_matrix_get(M, i, j));
+ }
+ STATUS("]\n");
+ }
+}
+
+
size_t notrail(char *s)
{
size_t i;