diagonal matrices specializations
Jaroslav Hajek
highegg at gmail.com
Thu Dec 4 11:40:55 CST 2008
On Thu, Dec 4, 2008 at 6:08 PM, John W. Eaton <jwe at octave.org> wrote:
> On 3-Dec-2008, Søren Hauberg wrote:
>
> | ons, 03 12 2008 kl. 14:31 +0100, skrev Jaroslav Hajek:
> | > >> ans =
> | > >> diagonal matrix (5x5)
> | > >> 1 .. 0
> | > >> 2
> | > >> : 3 :
> | > >> 4
> | > >> 0 .. 5
> | > >>
> | > >> the last form seems attractive, but maybe requires a bit more thinking
> | > >> about how to place the dots etc.
> | > >
> | > > This I don't think will work. It would be very hard to read a 20x20
> | > > matrix in a terminal with a width of 80 chars. But I agree, that it
> | > > looks nice for small matrices.
> | > >
> | >
> | > But anyone trying to work visually with 20x20 matrices on a 80-column
> | > terminal is bound to have problems.
> |
> | Not if you print it like a vector, which I think we should just always
> | do.
>
> Since it seems unlikely that we will all agree on the best way to
> display diagonal matrices, maybe it would be best to allow different
> output formats based on some preference? Perhaps as additional
> options to the format function. How about something like
>
> format diag full
> format diag row
> format diag column
>
This sounds like a good compromise.
> I'm not sure about the format you show above. It looks good for small
> matrices with integer elements, but the expectation is that matrices
> too wide for a terminal window will be wrapped, and I don't think this
> format would look very good when wrapped, but maybe it would work.
>
> jwe
>
--
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Octave-maintainers
mailing list