[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] human-readable gsl_matrix_fprintf?

From: Brian Gough
Subject: Re: [Help-gsl] human-readable gsl_matrix_fprintf?
Date: Sat, 1 Nov 2003 17:52:27 +0000

Tom Weber writes:
 > I just found out about gsl, this is the math library I always
 > needed but didn't know about!  I started playing with it, and found
 > that gsl_matrix_fprintf() prints one element per line, not very
 > readable if you ask me. Also I need to feed matrices to gnuplot.
 > The problem with human-readable matrices is the aligning of
 > columns, you must first check the max width of each column.  Why
 > isn't there a routine like this in gsl?

I considered adding a routine for pretty-printing but I realised there
are many possible formats that people would want (GNUPlot, Fortran,
R/S, Octave/Matlab, Maxima, LaTex, HTML, GP-PARI, XML, etc) and that I
I couldn't write one that was sufficiently general to handle all the
possibilities.  In particular there are also several common ways of
displaying complex numbers X Y, (X,Y), X+Y*I, X+Y*J.

I wanted to avoid the trap of adding "just one more" format each time,
or creating a function with so many arguments that it was difficult to
use, so I left it alone.

If I'm feeling strong I will think about it again.

Brian Gough

reply via email to

[Prev in Thread] Current Thread [Next in Thread]