This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Re: [Help-gsl] human-readable gsl_matrix_fprintf?
- From: Brian Gough <bjg at network-theory dot co dot uk>
- To: Tom Weber <np98towe at dd dot chalmers dot se>
- Cc: help-gsl at gnu dot org
- Cc: gsl-discuss at sources dot redhat dot com
- Date: Sat, 1 Nov 2003 17:52:27 +0000
- Subject: Re: [Help-gsl] human-readable gsl_matrix_fprintf?
- References: <200310311641.38688.np98towe@dd.chalmers.se>
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